1 2016-02-07 Werner Lemberg <wl@gnu.org>
3 * Version 2.6.3 released.
4 =========================
7 Tag sources with `VER-2-6-3'.
9 * docs/VERSION.DLL: Update documentation and bump version number to
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.6.2/2.6.3/, s/262/263/.
29 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
31 * builds/unix/configure.raw (version_info): Set to 18:3:12.
32 * CMakeLists.txt (VERSION_PATCH): Set to 2.
34 * docs/CHANGES: Updated.
36 2016-02-07 Werner Lemberg <wl@gnu.org>
38 Fix another runtime error found by clang's sanitizer (#47082).
40 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
43 2016-02-07 Werner Lemberg <wl@gnu.org>
45 Fix runtime errors found by clang's sanitizer (#47082).
47 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
48 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
49 Properly handle empty input buffer.
51 2016-02-07 Werner Lemberg <wl@gnu.org>
55 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
58 2016-02-07 Werner Lemberg <wl@gnu.org>
60 [cff] Implement missing operators in new engine (except `random').
62 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
64 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
65 following operators: abs, add, and, div, drop, dup, eq, exch, get,
66 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
68 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
69 auxiliary function for `roll' operator.
71 2016-02-06 Werner Lemberg <wl@gnu.org>
73 [cff] Fix some Type 2 operators in old CFF engine.
75 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
76 operator, add `not' and (unsupported) `blend' operators.
78 2016-02-05 Sebastian Rasmussen <sebras@gmail.com>
80 Make direct call of `make install' work (#47072).
82 * builds/unix/unix-def.in (freetype-config): Make sure
83 `freetype-config' is generated for both make targets (`all' and
86 2016-02-05 Werner Lemberg <wl@gnu.org>
88 [base] Fix advance width loading for MM and GX fonts (#47064).
90 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
94 2016-02-03 Werner Lemberg <wl@gnu.org>
96 [cff] Fix handling of face_index == -1 for pure CFF.
98 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
100 2016-01-30 Werner Lemberg <wl@gnu.org>
102 [autofit] Minor tracing improvement.
104 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
105 at the start of a new contour.
107 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
109 Remove unpatented hinter (3/3).
111 * include/freetype/config/ftoption.h
112 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
114 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
115 `ignore_unpatented_hinter' field.
117 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
120 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
121 `unpatented_hinting' field.
124 * src/base/ftpatent.c (_tt_check_patents_in_range,
125 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
126 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
127 Replace code with dummies.
129 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
130 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
133 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
135 Remove unpatented hinter (2/3).
137 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
139 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
141 Remove unpatented hinter (1/3).
143 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
144 Remove all code related to this macro.
146 2016-01-28 Werner Lemberg <wl@gnu.org>
148 [autofit] Add blue-zone support for Kannada script.
150 This essentially moves the Kannada script from the `Indic' hinter to
153 * src/autofit/afblue.dat: Add blue zone data for Kannada.
155 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
157 * src/autofit/afscript.h: Add Kannada standard characters and move
158 data out of AF_CONFIG_OPTION_INDIC block.
160 * src/autofit/afranges.c: Move Kannada data out of
161 AF_CONFIG_OPTION_INDIC block.
163 * src/autofit/afstyles.h: Update Kannada data; in particular, use
164 AF_WRITING_SYSTEM_LATIN.
166 2016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
168 Better access to 64-bit integers for C99 compilers.
170 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
171 __STDC_VERSION__ to define 64-bit integers.
172 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
173 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
175 2016-01-21 Werner Lemberg <wl@gnu.org>
177 [gxvalid] Remove commented out code.
179 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
181 2016-01-20 Werner Lemberg <wl@gnu.org>
183 [autofit] Complete last autofit commit.
185 Problem reported by Kostya Serebryany <kcc@google.com>.
187 * src/autofit/afshaper.c (af_shaper_get_coverage)
188 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
190 2016-01-20 Werner Lemberg <wl@gnu.org>
192 Still handle `__FTERRORS_H__'.
194 We need this for backwards compatibility.
196 Problem reported by John Emmas <johne53@tiscali.co.uk>.
198 * include/freetype/fterrors.h: Fix inclusion guard so that
199 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
202 2016-01-19 Werner Lemberg <wl@gnu.org>
204 [autofit] Fix handling of default script.
206 Patch taken from ttfautohint, commit
207 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
211 - We now use non-standard script tags like `khms' for special
212 purposes. However, HarfBuzz maps such tags to `DFLT', and
213 without this commit the associated lookups were incorrectly
214 assigned to the non-standard tags.
216 - Let's assume we have a Bengali font, and the font's `DFLT'
217 script tag handles the necessary lookups for Bengali, too.
218 Without this commit, the `DFLT' lookups were assigned to
219 ttfautohint's default script (usually `latn') before the
220 standard lookups for Bengali were handled.
222 We now have the following order while searching for covered
225 special features of scripts (e.g. `sups' for Cyrillic)
226 Unicode mappings of scripts
227 remaining features of scripts (especially important for Indic
229 default features of default script
231 * src/autofit/afshaper.c, src/autofit/afshaper.h
232 (af_shaper_get_coverage): Add boolean parameter to indicate default
236 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
237 Fix search order for coverages.
239 2016-01-19 Werner Lemberg <wl@gnu.org>
241 Various minor clang fixes.
243 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
244 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
247 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
249 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
251 * src/base/fthash.c (hash_num_lookup): Add cast.
253 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
255 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
258 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
261 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
263 2016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
265 [truetype] Add another tricky font.
267 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
268 (sfnt_id): Add variant of `DFKaiShu'.
270 2016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
272 [base] Empower `FT_Library_SetLcdFilterWeights'.
274 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
275 in addition to setting weights.
276 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
277 FT_FORCE_LEGACY_LCD_FILTER.
278 * include/freetype/ftlcdfil.h: Documentation update.
280 2016-01-12 Werner Lemberg <wl@gnu.org>
282 Don't use macro names that start with `_[A-Z]' [3/3].
284 Such macro names are reserved for both C and C++.
286 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
288 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
289 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
291 2016-01-12 Werner Lemberg <wl@gnu.org>
293 Don't use macro names that start with `_[A-Z]' [2/3].
295 Such macro names are reserved for both C and C++.
297 * include/freetype/ftimage.h, src/raster/ftraster.c,
298 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
299 s/_STANDALONE_/STANDALONE_/.
301 2016-01-12 Werner Lemberg <wl@gnu.org>
303 Don't use macro names that start with `_[A-Z]' [1/3].
305 Such macro names are reserved for both C and C++.
307 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
310 2016-01-12 Werner Lemberg <wl@gnu.org>
312 Don't use macro names that contain `__' [2/2].
314 Such macro names are reserved for both C and C++.
316 * src/cache/*: s/__/_/.
318 2016-01-12 Werner Lemberg <wl@gnu.org>
320 Don't use macro names that contain `__' [1/2].
322 Such macro names are reserved for both C and C++.
324 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
326 2016-01-10 Jered Gray <jegray@google.com>
328 [cff] Fix usage of `|' operator.
330 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
331 default]: `|' is not guaranteed to be processed from left to right
332 by the compiler. However, the code repeatedly calls
333 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
335 2015-12-25 Werner Lemberg <wl@gnu.org>
337 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
339 This improves rendering of scripts like Bengali or Devanagari.
341 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
342 pass top-to-bottom hinting flag. This makes the function sort edges
343 in descending vertical position.
345 * src/autofit/afhints.c: Updated.
347 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
348 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
350 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
351 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
353 2015-12-24 Werner Lemberg <wl@gnu.org>
355 [autofit] Add hinting direction to `AF_ScriptClassRec'.
359 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
361 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
362 `top_to_bottom_hinting' field.
363 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
364 (AF_DEFINE_SCRIPT_CLASS): Updated.
366 2015-12-23 Werner Lemberg <wl@gnu.org>
368 [autofit] Start implementing hinting direction (up/down, down/up).
370 Right now, it does nothing.
372 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
373 specifying hinting direction.
375 * src/autofit/afglobal.c, scr/autofit/afglobal.h,
376 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
377 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
379 2015-12-22 Werner Lemberg <wl@gnu.org>
381 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
383 2015-12-22 Werner Lemberg <wl@gnu.org>
385 [base] Make hash interface symmetric.
387 Use `num' and `str' infixes everywhere.
389 * src/base/fthash.c (ft_hash_init): Renamed to...
390 (hash_init): ... This.
391 (ft_hash_str_init, ft_hash_num_init): New functions.
392 (ft_hash_free): Renamed to...
393 (ft_hash_str_free): ... This.
395 * include/freetype/internal/fthash.h: Updated.
397 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
399 2015-12-21 Werner Lemberg <wl@gnu.org>
401 [type1] Avoid shift of negative numbers (#46732).
403 * src/type1/t1load.c (parse_subrs): Do it.
405 2015-12-20 Werner Lemberg <wl@gnu.org>
407 [type1, psaux] Handle large values of num_subrs correctly (#46692).
409 We now use a hash to map from subr indices to array elements holding
410 the subroutines, if necessary.
412 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
413 (T1_FontRec): Add `subrs_hash' field.
415 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
416 (T1_DecoderRec): Add `subrs_hash' field.
418 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
420 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
421 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
423 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
424 (parse_subrs): Use hash for subr indices that exceed the allocated
425 number of subr slots.
426 (t1_init_loader): Remove unnecessary code.
427 (t1_done_loader, T1_Open_Face): Updated.
429 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
430 T1_Load_Glyph): Updated.
432 * src/type1/t1objs.c (T1_Face_Done): Updated.
434 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
435 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
438 * src/cid/cidgload.c (cid_load_glyph): Updated.
440 2015-12-20 Werner Lemberg <wl@gnu.org>
442 [base] Thinko: Remove free function pointer.
444 We don't copy keys or values while hashing.
446 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
447 (FT_HashRec): Remove `free' field.
449 * src/base/fthash.c (hash_str_free): Removed.
450 (ft_hash_init, ft_hash_free): Updated.
452 2015-12-20 Werner Lemberg <wl@gnu.org>
454 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
456 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
457 ft_hash_num_lookup): Return pointer to `size_t' instead of
460 * include/freetype/internal/fthash.h: Updated.
462 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
463 bdf_get_font_property): Updated.
465 2015-12-20 Werner Lemberg <wl@gnu.org>
467 [base, bdf] Add number hashing.
469 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
471 (ft_hash_init): Add argument to select between number and string
473 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
475 * include/freetype/internal/fthash.h: Updated.
477 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
479 2015-12-20 Werner Lemberg <wl@gnu.org>
481 [base] Introduce hash lookup, compare, and free function pointers.
483 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
484 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
485 (FT_HashRec): Add `lookup', `compare', and `free' fields.
487 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
488 hash_str_free): New functions.
489 (ft_hash_init): Set function pointers.
490 (hash_bucket, ft_hash_free): Use them.
492 2015-12-20 Werner Lemberg <wl@gnu.org>
494 [base, bdf] Use a union as a hash key.
496 We want to support both an integer and a string key later on.
498 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
499 (FT_HashnodeRec): Updated.
500 (ft_hash_insert, ft_hash_lookup): Renamed to ...
501 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
503 * src/base/fthash.c (hash_bucket): Updated.
504 (ft_hash_insert, ft_hash_lookup): Renamed to ...
505 (hash_insert, hash_lookup): ... this.
506 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
508 * src/bdf/bdflib.c: Updated.
510 2015-12-19 Werner Lemberg <wl@gnu.org>
512 [bdf] Use new hash functions.
514 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
515 (hashnode, hashtable): Removed.
516 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
518 * src/bdf/bdflib.c: Remove all hash functions.
519 Update code for new hash structure and function names.
521 2015-12-19 Werner Lemberg <wl@gnu.org>
523 [bdf, base] Lift hash functions from bdf driver to base module.
525 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
526 containing (massaged) code from `bdflib.c' and `bdf.h'.
528 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
531 * src/base/ftbase.c: Include `fthash.c'.
533 * src/base/Jamfile (_sources): Add `fthash'.
535 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
537 * docs/LICENSE.TXT: Updated.
539 2015-12-15 Werner Lemberg <wl@gnu.org>
541 [autofit] Add blue-zone support for Bengali script.
543 This essentially moves the Bengali script from the `Indic' hinter to
546 * src/autofit/afblue.dat: Add blue zone data for Bengali.
548 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
550 * src/autofit/afscript.h: Add Bengali standard characters and move
551 data out of AF_CONFIG_OPTION_INDIC block.
553 * src/autofit/afranges.c: Move Bengali data out of
554 AF_CONFIG_OPTION_INDIC block.
556 * src/autofit/afstyles.h: Update Bengali data; in particular, use
557 AF_WRITING_SYSTEM_LATIN.
559 2015-12-14 Ben Wagner <bungeman@gmail.com>
561 [bdf] Remove dead code (#46625).
563 The BDF specification only allows decimal numbers, no octal or
564 hexidecimal decoding is needed.
566 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
567 _bdf_atos): Remove unused code and parameters.
571 2015-12-14 Werner Lemberg <wl@gnu.org>
573 [base] Fix calls to `FT_Stream_Seek'.
575 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
578 2015-12-14 Ben Wagner <bungeman@gmail.com>
580 [base] Check error when seeking to data supplied offset (#46635).
582 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
583 `ft_lookup_PS_in_sfnt_stream' returns offset and and length from
584 user supplied data. Use of this these values must be checked.
586 2015-12-13 Werner Lemberg <wl@gnu.org>
588 [autofit] Add support for Myanmar script.
590 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
592 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
594 * src/autofit/afscript.h: Add Myanmar standard characters.
596 * src/autofit/afranges.c: Add Myanmar data.
598 * src/autofit/afstyles.h: Add Myanmar data.
600 2015-12-12 Werner Lemberg <wl@gnu.org>
602 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
604 2015-12-12 Werner Lemberg <wl@gnu.org>
606 * src/autofit/afscript.h: Avoid potential crash.
608 2015-12-10 Werner Lemberg <wl@gnu.org>
610 [autofit] Restore OpenType feature check.
612 This was removed while rewriting the HarfBuzz interface.
614 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
615 hold internal HarfBuzz buffer, needed for feature comparison.
617 * src/autofit/afglobal.c (af_face_globals_new,
618 af_face_globals_free): Initialize and destroy `hb_buf'.
620 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
621 (cluster) with and without applied feature.
623 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
626 2015-12-10 Werner Lemberg <wl@gnu.org>
628 [autofit] Remove redundant code.
630 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
632 2015-12-09 Werner Lemberg <wl@gnu.org>
636 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
637 empty blue zones (bug introduced 2015-12-06).
639 2015-12-09 Werner Lemberg <wl@gnu.org>
641 [autofit] Introduce subscript top blue zones.
643 This feature is mainly for Khmer: The idea is to avoid a clash
644 between the top of subscript glyphs and the bottom of normal
647 This only works for character clusters mapped to multiple glyphs.
649 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
651 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
654 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
656 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
657 AF_LATIN_BLUE_SUB_TOP): New macros.
659 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
661 Update tracing messages.
662 (af_latin_metrics_scale_dim): Handle new blue zone property.
663 (af_latin_hints_compute_blue_edges): Updated.
665 2015-12-09 Werner Lemberg <wl@gnu.org>
667 [autofit] Fix tracing message.
669 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
670 inactive blue zones also.
672 2015-12-06 Werner Lemberg <wl@gnu.org>
674 * src/autofit/afblue.dat: Add more Khmer clusters.
676 Some fonts have incorrect ligatures; we need more samples to get a
679 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
681 2015-12-06 Werner Lemberg <wl@gnu.org>
685 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
686 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
688 2015-12-06 Werner Lemberg <wl@gnu.org>
690 [autofit] Add support for Khmer script.
692 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
693 `Khmer symbols' (`khms', U+19E0-U+19FF).
695 * src/autofit/afblue.dat: Add blue zone data for Khmer.
697 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
699 * src/autofit/afscript.h: Add Khmer standard characters.
701 * src/autofit/afranges.c: Add Khmer data.
703 * src/autofit/afstyles.h: Add Khmer data.
705 2015-12-06 Werner Lemberg <wl@gnu.org>
707 [autofit] Rewrite HarfBuzz interface to support character clusters.
709 Scripts like Khmer have blue zones that can't be directly
710 represented by Unicode characters. Instead, it is necessary to let
711 HarfBuzz convert character clusters into proper glyph representation
712 forms, then deriving the blue zone information from the resulting
715 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
716 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
717 files, providing a new API to access HarfBuzz.
719 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
720 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
721 string with function `af_shaper_get_cluster', and the resulting
722 glyph data (indices, advance widths, vertical offsets) can be
723 iteratively accessed with function `af_shaper_get_elem'.
725 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
726 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
728 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
729 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
732 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
734 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
735 (af_face_globals_compute_style_coverage): Updated.
737 * src/autofit/afglocal.h: s/hbshim.h/afshaper.h/.
739 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
741 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
744 2015-12-06 Werner Lemberg <wl@gnu.org>
746 [autofit] Prepare forthcoming changes.
748 This makes it easier to control the commits.
750 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
751 loop. No functional change.
753 2015-12-06 Werner Lemberg <wl@gnu.org>
755 [autofit] Use string of standard characters.
757 This is more flexible; additionally, it would allow character
760 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
761 (AF_ScriptClassRec): Replace `standard_char[123]' with
762 `standard_charstring'.
764 * src/autofit/afscript.h: Replace last three character arguments
765 of the `SCRIPT' calls with a string parameter, holding the standard
766 characters (in UTF-8 encoding) separated with spaces.
768 * src/autofit/afglobal.c, src/autofit/afglobal.h,
769 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
772 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
773 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
775 2015-12-05 Werner Lemberg <wl@gnu.org>
777 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
779 Another preparation for character cluster support.
781 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
783 2015-12-05 Werner Lemberg <wl@gnu.org>
785 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
787 Instead, reduce multiple spaces to a single one. We need this later
788 for supporting character clusters in `afblue.dat'.
790 2015-12-05 Werner Lemberg <wl@gnu.org>
792 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
794 * src/autofit/afblue.h: Regenerated.
796 2015-12-05 Werner Lemberg <wl@gnu.org>
798 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
800 2015-12-03 Werner Lemberg <wl@gnu.org>
802 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
804 2015-12-01 Werner Lemberg <wl@gnu.org>
806 [type1] Avoid dangling pointer (#46572).
808 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
811 2015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
813 * include/freetype/ftlcdfil.h: Documentation tweak.
815 2015-11-28 Werner Lemberg <wl@gnu.org>
817 * Version 2.6.2 released.
818 =========================
821 Tag sources with `VER-2-6-2'.
823 * docs/VERSION.DLL: Update documentation and bump version number to
826 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
827 builds/windows/vc2005/index.html,
828 builds/windows/vc2008/freetype.vcproj,
829 builds/windows/vc2008/index.html,
830 builds/windows/vc2010/freetype.vcxproj,
831 builds/windows/vc2010/index.html,
832 builds/windows/visualc/freetype.dsp,
833 builds/windows/visualc/freetype.vcproj,
834 builds/windows/visualc/index.html,
835 builds/windows/visualce/freetype.dsp,
836 builds/windows/visualce/freetype.vcproj,
837 builds/windows/visualce/index.html,
838 builds/wince/vc2005-ce/freetype.vcproj,
839 builds/wince/vc2005-ce/index.html,
840 builds/wince/vc2008-ce/freetype.vcproj,
841 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
843 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
845 * builds/unix/configure.raw (version_info): Set to 18:2:12.
846 * CMakeLists.txt (VERSION_PATCH): Set to 2.
848 * docs/CHANGES: Updated.
850 2015-11-28 Werner Lemberg <wl@gnu.org>
854 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
856 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
858 2015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
860 Change default LCD filter to be normalized and color-balanced.
862 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
865 2015-11-28 Werner Lemberg <wl@gnu.org>
867 [docmaker] Allow references to section names.
869 In the reference, we show the section's title enclosed in single
872 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
873 section names as identifiers.
875 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
876 (section_title_header1, section_title_header2): ... these two
878 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
880 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
882 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
884 [cmake] Add script to test the config module.
886 * builds/cmake/testbuild.sh: New file.
888 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
890 * CMakeLists.txt: Create `freetype-config.cmake' config module.
892 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
894 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
896 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
898 [cmake] Add better control of library dependencies.
900 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
901 ZLIB/BZip2/PNG/HarfBuzz.
903 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
905 [cmake] Make `FindHarfbuzz' observe the REQUIRED option.
907 * builds/cmake/FindHarfBuzz.cmake: Implement it.
909 2015-11-27 Werner Lemberg <wl@gnu.org>
911 [cmake] Collect files specific to cmake in `builds/cmake'.
913 * builds/FindHarfBuzz.cmake: Move to ...
914 * builds/cmake/FindHarfBuzz.cmake: ... this place.
916 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
918 2015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
920 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
922 2015-11-26 Werner Lemberg <wl@gnu.org>
924 [docmaker] Allow `foo[bar]' as identifier.
926 We need this to handle equally named properties in different
929 * src/tools/docmaker/content.py (re_identifier),
930 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
932 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
933 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
934 HtmlFormatter::block_enter): Handle `foo[bar]'.
936 2015-11-25 Werner Lemberg <wl@gnu.org>
938 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
940 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
943 2015-11-21 Werner Lemberg <wl@gnu.org>
945 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
947 This fixes compiler warnings.
951 2015-11-20 Werner Lemberg <wl@gnu.org>
953 Add `FT_LCD_FILTER_LEGACY1' enum value.
955 This does the same as `FT_LCD_FILTER_LEGACY'.
959 https://bugs.freedesktop.org/show_bug.cgi?id=92981
963 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
964 `FT_LCD_FILTER_LEGACY1'.
966 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
968 2015-11-15 Werner Lemberg <wl@gnu.org>
970 * src/autofit/afhints.c (af_get_segment_index): Fix it.
972 The old code was too simple, returning invalid values in most cases
973 where a segment crosses the contour start.
975 2015-11-15 Werner Lemberg <wl@gnu.org>
977 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
979 2015-11-11 Werner Lemberg <wl@gnu.org>
981 [cff, autofit] Switch off stem darkening by default.
983 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
984 (cff_driver_init): Do it.
986 2015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
988 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
990 Both the native CFF hinter and the auto-hinter now have a very
991 similar rendering style.
993 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
994 longer implies FT_LOAD_FORCE_AUTOHINT.
996 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
999 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
1002 * src/cff/cffdrivr.c (cff_driver_class): Use it.
1004 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
1007 2015-11-09 Werner Lemberg <wl@gnu.org>
1009 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
1011 2015-11-09 Werner Lemberg <wl@gnu.org>
1013 [truetype] Remove integer to pointer conversion compiler warning.
1015 Problem reported by Alexei.
1017 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
1018 in the glib library to fix the issue.
1020 2015-11-08 Behdad Esfahbod <behdad@behdad.org>
1022 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
1024 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
1026 2015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
1028 [autofit] Don't distort (latin) glyphs too much (#46195).
1030 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
1033 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
1034 ascender and descender data for blue zones.
1035 (af_latin_metrics_scale_dim): Reject vertical scaling values that
1036 change the result by more than two pixels.
1038 2015-11-05 Werner Lemberg <wl@gnu.org>
1040 [sfnt] Ignore embedded bitmaps with zero size (#46379).
1042 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
1045 2015-11-04 Werner Lemberg <wl@gnu.org>
1047 [truetype] Catch infinite recursion in subglyphs (#46372).
1049 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
1052 * src/truetype/ttgload.c: Include FT_LIST_H.
1053 (load_truetype_glyph): Add composite subglyph index to a list;
1054 abort if index is already in list.
1055 (tt_loader_init): Updated.
1056 (tt_loader_done): New function.
1057 (TT_Load_Glyph): Call `tt_loader_done'.
1059 2015-11-04 Werner Lemberg <wl@gnu.org>
1061 [truetype] Better tracing of composite glyphs.
1063 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
1064 load_truetype_glyph): Implement it.
1066 2015-11-03 Werner Lemberg <wl@gnu.org>
1068 [sfnt] Protect against zero-size bitmaps (#46345).
1070 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
1073 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1075 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
1077 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1079 [autofit] Implement darkening computation function.
1081 This is a crude adaption of the original `cf2_computeDarkening'
1084 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
1085 af_floatToFixed): New macros, taken from `cf2fixed.h'.
1086 (af_loader_compute_darkening): New function.
1087 * src/autofit/afloader.h: Updated.
1089 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1091 [autofit] Add functions to get standard widths for writing systems.
1093 We need the computed standard horizontal and vertical widths for the
1094 emboldening calculation. This method provides a convenient way to
1095 extract it from writing-system-specific metrics structures, which
1096 all script definitions must implement.
1098 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
1100 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
1101 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
1103 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
1104 (af_cjk_writing_system_class): Updated.
1105 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
1106 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
1107 (af_indic_writing_system_class): Updated.
1108 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
1109 (af_indic_writing_system_class): Updated.
1110 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
1111 (af_indic_writing_system_class): Updated.
1113 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1115 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
1117 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
1119 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
1121 (af_face_globals_free): Reset new fields.
1123 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1125 [autofit] Add stem-darkening properties.
1127 Actual code follows in a later commit.
1129 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
1130 `darkening-parameters'.
1132 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
1135 * src/autofit/afmodule.c (af_property_set, af_property_get):
1137 (af_autofitter_init): Initialize them.
1139 2015-11-02 Ben Wagner <bungeman@gmail.com>
1141 [ftfuzzer] Add support for multiple files (patch #8779).
1143 Currently, libFuzzer only supports mutation of a single file. We
1144 circumvent this problem by using an uncompressed tar archive as
1145 multiple-file input for the fuzzer.
1147 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
1148 a constructed tarball should contain a font file as the first
1149 element, and files to be attached as further elements.
1151 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
1152 (archive_read_entry_data, parse_data): New functions.
1153 (LLVMFuzzerTestOneInput): Updated.
1155 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
1156 mutator for libFuzzer that can mutate tarballs in a sensible way.
1158 2015-10-31 Werner Lemberg <wl@gnu.org>
1160 [sfnt] Fix cmap 14 validation (#46346).
1162 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
1163 accessing `numRanges' and `numMappings'.
1164 Fix size check for non-default UVS table.
1166 2015-10-31 Werner Lemberg <wl@gnu.org>
1168 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
1170 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
1171 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
1172 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
1173 argument for recursion depth.
1174 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
1175 Increase recursion counter for recursive call.
1176 (tt_sbit_decoder_load_image): Add argument for recursion depth.
1177 Check recurse depth.
1178 (tt_face_load_sbit_image): Updated.
1180 2015-10-29 Werner Lemberg <wl@gnu.org>
1182 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
1184 2015-10-29 Werner Lemberg <wl@gnu.org>
1186 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
1188 Problem reported by David Capello <davidcapello@gmail.com>; see
1190 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
1194 2015-10-27 Werner Lemberg <wl@gnu.org>
1196 [pfr] Add some safety guards (#46302).
1198 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
1199 (PFR_CHECK_SIZE): ... this.
1200 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
1202 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
1203 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
1204 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
1205 Allocate `chars' after doing a size checks.
1207 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
1209 (pfr_slot_load_bitmap): ... this function.
1212 2015-10-26 Werner Lemberg <wl@gnu.org>
1214 [truetype] Fix sanitizing logic for `loca' (#46223).
1216 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
1217 incorrect adjustment of the number of glyphs, most often using far
1220 2015-10-25 Werner Lemberg <wl@gnu.org>
1222 [autofit] Improve tracing.
1224 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
1225 af_get_edge_index): New functions.
1227 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
1228 Add segment and edge index for each point.
1229 Slightly change printing order of some elements.
1230 Don't print `-1' but `--' for missing elements.
1232 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
1233 unnecessary `|', `[', and `]'.
1234 Don't print `-1' but `--' for missing elements.
1236 2015-10-24 Werner Lemberg <wl@gnu.org>
1238 [sfnt] Sanitize bitmap strike glyph height.
1240 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
1242 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
1243 for `metrics->height' by applying some heuristics.
1245 2015-10-22 Werner Lemberg <wl@gnu.org>
1247 [sfnt, type42] Fix clang compiler warnings.
1249 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
1251 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
1253 2015-10-22 Dave Arnold <darnold@adobe.com>
1254 Werner Lemberg <wl@gnu.org>
1256 [cff] Avoid overflow/module arithmetic.
1258 This modifies the addition of subroutine number to subroutine bias
1259 from unsigned to signed, but does not change any results.
1261 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
1262 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
1263 `idx' to (signed) `subrNum', since it is not an index until after
1265 * src/cff/cf2ft.h: Updated.
1267 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
1270 2015-10-22 Werner Lemberg <wl@gnu.org>
1272 [cid] Better check of `SubrCount' dictionary entry (#46272).
1274 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
1275 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
1277 2015-10-21 Werner Lemberg <wl@gnu.org>
1279 [base] Pacify compiler (#46266).
1281 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
1284 2015-10-21 Werner Lemberg <wl@gnu.org>
1286 [type42] Fix heap buffer overflow (#46269).
1288 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
1291 2015-10-21 Dave Arnold <darnold@adobe.com>
1293 [cff] Fix limit in assert for max hints.
1295 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
1298 2015-10-21 Dave Arnold <darnold@adobe.com>
1300 [cff] Remove an assert (#46107).
1302 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
1305 2015-10-21 Werner Lemberg <wl@gnu.org>
1307 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
1309 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
1310 only after thorough checks.
1311 Add tracing messages.
1313 2015-10-21 Werner Lemberg <wl@gnu.org>
1315 [type42] Better check invalid `sfnts' array data (#46255).
1317 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
1318 checked individually against available data size.
1320 2015-10-20 Werner Lemberg <wl@gnu.org>
1322 [cid] Add a bunch of safety checks.
1324 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
1326 (cid_read_subrs): Check largest offset against stream size.
1327 (cid_parse_dict): Move safety check to ...
1328 (cid_face_open): ... this function.
1329 Also test length of binary data and values of `SDBytes',
1330 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
1332 2015-10-20 Werner Lemberg <wl@gnu.org>
1334 [cid] Avoid segfault with malformed input (#46250).
1336 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
1339 2015-10-20 StudioEtrange <nomorgan@gmail.com>
1341 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
1343 2015-10-20 Werner Lemberg <wl@gnu.org>
1345 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
1347 2015-10-19 Ben Wagner <bungeman@gmail.com>
1349 [cid] Better handle invalid glyph stream offsets (#46221).
1351 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
1354 2015-10-18 Werner Lemberg <wl@gnu.org>
1356 [psaux] Fix tracing of negative numbers.
1358 Due to incorrect casting negative numbers were shown as very large
1359 (positive) integers on 64bit systems.
1361 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
1362 Use division instead of shift.
1364 2015-10-18 Werner Lemberg <wl@gnu.org>
1366 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
1368 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
1369 with #ifndef ... #endif, as suggested in the tracker issue.
1371 2015-10-18 Werner Lemberg <wl@gnu.org>
1373 [truetype] Better protection against malformed `fpgm' (#46223).
1375 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
1376 malformed `fpgm' table more than once.
1378 2015-10-17 Werner Lemberg <wl@gnu.org>
1380 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
1382 Reported by Kostya Serebryany <kcc@google.com>.
1384 2015-10-17 Werner Lemberg <wl@gnu.org>
1386 [bdf] Prevent memory leak (#46217).
1388 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
1391 2015-10-17 Werner Lemberg <wl@gnu.org>
1393 [bdf] Use stream size to adjust number of glyphs.
1395 * src/bdf/bdflib.c (ACMSG17): New message macro.
1396 (_bdf_parse_t): Add member `size'.
1397 (bdf_load_font): Set `size'.
1398 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
1400 2015-10-17 Werner Lemberg <wl@gnu.org>
1402 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
1404 2015-10-17 Werner Lemberg <wl@gnu.org>
1406 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
1408 2015-10-17 Werner Lemberg <wl@gnu.org>
1410 [psaux] Fix heap buffer overflow (#46221).
1412 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
1415 2015-10-17 Werner Lemberg <wl@gnu.org>
1417 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
1419 2015-10-15 Kostya Serebryany <kcc@google.com>
1421 [ftfuzzer] Add README.
1423 * src/tools/ftfuzzer/README: New file.
1425 2015-10-15 Ben Wagner <bungeman@gmail.com>
1427 [bdf] Fix memory leak (#46213).
1429 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
1432 2015-10-15 Werner Lemberg <wl@gnu.org>
1434 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
1436 * devel/ftoption.h, include/freetype/config/ftoption.h
1437 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
1439 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
1440 (TT_RunIns): Updated.
1442 2015-10-15 Werner Lemberg <wl@gnu.org>
1444 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
1446 The used indices were off by 1.
1448 2015-10-15 Ben Wagner <bungeman@gmail.com>
1449 Werner Lemberg <wl@gnu.org>
1451 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
1453 2015-10-15 Werner Lemberg <wl@gnu.org>
1455 [base] Compute MD5 checksums only if explicitly requested.
1457 This improves profiling accuracy.
1459 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
1461 2015-10-14 Werner Lemberg <wl@gnu.org>
1463 [base] Use `FT_' namespace for MD5 functions (#42366).
1465 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
1466 Undefine HAVE_OPENSSL.
1468 2015-10-13 Werner Lemberg <wl@gnu.org>
1470 [type1] Correctly handle missing MM axis names (#46202).
1472 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
1474 2015-10-13 Werner Lemberg <wl@gnu.org>
1476 [pcf] Quickly exit if font index < 0.
1478 Similar to other font formats, this commit makes the parser no
1479 longer check the whole PCF file but only the header and the TOC if
1480 we just want to get the number of available faces (and a proper
1481 recognition of the font format).
1483 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
1484 Exit quickly if face_index < 0.
1486 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
1487 Exit quickly if face_index < 0.
1489 * src/pcf/pcf.h: Updated.
1491 2015-10-13 Werner Lemberg <wl@gnu.org>
1493 [ftfuzzer] Handle TTCs and MM/GX variations.
1495 This patch also contains various other improvements.
1497 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
1498 pre-C++11 compilers.
1499 (FT_Global): New class. Use it to provide a global constructor and
1500 destructor for the `FT_Library' object.
1501 (setIntermediateAxis): New function to select an (arbitrary)
1503 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
1504 Also call `FT_Set_Char_Size'.
1506 2015-10-13 Werner Lemberg <wl@gnu.org>
1508 [truetype] Refine some GX sanity tests.
1510 Use the `gvar' table size instead of the remaining bytes in the
1513 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
1515 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
1516 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
1518 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
1520 2015-10-13 Werner Lemberg <wl@gnu.org>
1522 [truetype] Another GX sanity test.
1524 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
1526 Add tracing message.
1528 2015-10-13 Werner Lemberg <wl@gnu.org>
1530 [truetype] Fix memory leak for broken GX fonts (#46188).
1532 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
1535 2015-10-13 Werner Lemberg <wl@gnu.org>
1537 [truetype] Fix commit from 2015-10-10.
1539 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
1540 handling body to condition.
1542 2015-10-12 Werner Lemberg <wl@gnu.org>
1544 [unix] Make MKDIR_P actually work.
1546 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
1549 Problem reported by Dan Liddell <lddll@yahoo.com>.
1551 2015-10-11 Werner Lemberg <wl@gnu.org>
1553 [sfnt] Improve extraction of number of named instances.
1555 * src/sfnt/sfobjs.c (sfnt_init_face)
1556 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
1559 2015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1561 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
1564 2015-10-10 Werner Lemberg <wl@gnu.org>
1566 [sfnt] Fix infinite loops with broken cmaps (#46167).
1568 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
1569 of border conditions (i.e., if the loops exit naturally).
1571 2015-10-10 Werner Lemberg <wl@gnu.org>
1573 [truetype] More sanity tests for GX handling.
1575 These tests should mainly help avoid unnecessarily large memory
1576 allocations in case of malformed fonts.
1578 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
1579 ft_var_readpackeddeltas): Check number of points against stream
1581 (ft_var_load_avar): Check `pairCount' against table length.
1582 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
1583 against table length.
1584 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
1586 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
1587 Free `sharedpoints' to avoid memory leak.
1589 2015-10-10 Werner Lemberg <wl@gnu.org>
1591 [truetype] Better protection against malformed GX data (#46166).
1593 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
1594 handle empty `localpoints' array.
1596 2015-10-10 Werner Lemberg <wl@gnu.org>
1598 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
1600 2015-10-09 Werner Lemberg <wl@gnu.org>
1602 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
1604 2015-10-08 Werner Lemberg <wl@gnu.org>
1606 [pcf] Protect against invalid number of TOC entries (#46159).
1608 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
1609 against size of data stream.
1611 2015-10-08 Werner Lemberg <wl@gnu.org>
1613 [type42] Protect against invalid number of glyphs (#46159).
1615 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
1616 `CharStrings' dictionary entries against size of data stream.
1618 2015-10-08 Werner Lemberg <wl@gnu.org>
1620 [sfnt] Fix some signed overflows (#46149).
1622 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1623 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
1625 2015-10-08 Werner Lemberg <wl@gnu.org>
1627 [type1] Protect against invalid number of subroutines (#46150).
1629 * src/type1/t1load.c (parse_subrs): Check number of
1630 `Subrs' dictionary entries against size of data stream.
1632 2015-10-07 Kostya Serebryany <kcc@google.com>
1634 [ftfuzzer] Add support for LLVM's LibFuzzer.
1636 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
1638 2015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1640 [smooth] Faster alternative line renderer.
1642 This implementation renders the entire line segment at once without
1643 subdividing it into scanlines. The main speed improvement comes from
1644 reducing the number of divisions to just two per line segment, which
1645 is a bare minimum to calculate cell coverage in a smooth rasterizer.
1646 Notably, the progression from cell to cell does not itself require any
1647 divisions at all. The speed improvement is more noticeable at larger
1650 * src/smooth/ftgrays.c (gray_render_line): New implementation.
1652 2015-10-06 Werner Lemberg <wl@gnu.org>
1654 [cff] Return correct PS names from pure CFF (#46130).
1656 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
1659 2015-10-04 Werner Lemberg <wl@gnu.org>
1661 [base] Replace left shifts with multiplication (#46118).
1663 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
1665 2015-10-04 Werner Lemberg <wl@gnu.org>
1667 * Version 2.6.1 released.
1668 =========================
1671 Tag sources with `VER-2-6-1'.
1673 * docs/VERSION.DLL: Update documentation and bump version number to
1676 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1677 builds/windows/vc2005/index.html,
1678 builds/windows/vc2008/freetype.vcproj,
1679 builds/windows/vc2008/index.html,
1680 builds/windows/vc2010/freetype.vcxproj,
1681 builds/windows/vc2010/index.html,
1682 builds/windows/visualc/freetype.dsp,
1683 builds/windows/visualc/freetype.vcproj,
1684 builds/windows/visualc/index.html,
1685 builds/windows/visualce/freetype.dsp,
1686 builds/windows/visualce/freetype.vcproj,
1687 builds/windows/visualce/index.html,
1688 builds/wince/vc2005-ce/freetype.vcproj,
1689 builds/wince/vc2005-ce/index.html,
1690 builds/wince/vc2008-ce/freetype.vcproj,
1691 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
1693 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
1695 * builds/unix/configure.raw (version_info): Set to 18:1:12.
1696 * CMakeLists.txt (VERSION_PATCH): Set to 1.
1698 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
1701 2015-10-04 Werner Lemberg <wl@gnu.org>
1703 [bzip2, gzip] Avoid access of unitialized memory (#46109).
1705 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
1706 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
1707 avoid copying uninitialized memory.
1709 2015-10-03 Werner Lemberg <wl@gnu.org>
1711 [bzip2, gzip] Avoid access of unitialized memory (#46109).
1713 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
1714 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
1715 avoid copying uninitialized memory.
1717 2015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1719 [smooth] Clean up worker.
1721 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
1723 2015-10-01 Werner Lemberg <wl@gnu.org>
1725 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
1727 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
1728 border conditions (i.e., if the loop exits naturally).
1730 2015-10-01 Werner Lemberg <wl@gnu.org>
1732 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
1733 They should be a subset of `af_deva_uniranges'.
1735 2015-10-01 Werner Lemberg <wl@gnu.org>
1737 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
1739 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
1740 reject too large glyph indices.
1742 2015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1744 [smooth] Clean up worker.
1746 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
1747 (gray_start_cell, gray_render_line): Update.
1749 2015-09-30 Werner Lemberg <wl@gnu.org>
1751 [autofit] Replace `no-base' with `non-base'.
1753 * src/autofit/*: Do it.
1755 2015-09-30 Werner Lemberg <wl@gnu.org>
1757 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
1759 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
1760 skip invalid segments.
1761 If searching the next character, provide a more efficient logic to
1764 2015-09-30 Werner Lemberg <wl@gnu.org>
1766 [truetype] Adjust number of glyphs for malformed `loca' tables.
1768 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
1770 2015-09-29 Werner Lemberg <wl@gnu.org>
1772 [pshinter] Avoid harmless overflow (#45984).
1774 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
1776 2015-09-28 Werner Lemberg <wl@gnu.org>
1778 [autofit] Add support for Lao script.
1780 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
1783 * src/autofit/afblue.dat: Add blue zone data for Lao.
1785 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1787 * src/autofit/afscript.h: Add Lao standard characters.
1789 * src/autofit/afranges.c: Add Lao data.
1791 * src/autofit/afstyles.h: Add Lao data.
1793 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1795 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
1797 open_face_from_buffer() frees passed buffer if valid font
1798 is not found. But if copying to the buffer is failed,
1799 the allocated buffer should be freed within the caller.
1801 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
1802 the buffer `sfnt_ps' if an error caused before calling
1803 open_face_from_buffer().
1804 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
1805 an error caused before calling open_face_from_buffer();
1807 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1809 [mac] Fix buffer size calculation for LWFN font.
1811 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
1812 to prevent confused copy by too large chunk size.
1814 2015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
1816 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
1818 2015-09-26 Werner Lemberg <wl@gnu.org>
1820 [autofit] Minor tracing improvement.
1822 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
1823 blue zones header line if there are no blue zones.
1825 2015-09-26 Werner Lemberg <wl@gnu.org>
1827 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
1829 Suggested by Hin-Tak Leung.
1831 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
1832 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
1834 2015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
1836 Add new FT_LOAD_COMPUTE_METRICS load flag.
1838 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
1839 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
1841 2015-09-26 Werner Lemberg <wl@gnu.org>
1843 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
1845 2015-09-25 Werner Lemberg <wl@gnu.org>
1847 [type1] Protect against invalid number of glyphs (#46029).
1849 * src/type1/t1load.c (parse_charstrings): Check number of
1850 `CharStrings' dictionary entries against size of data stream.
1852 2015-09-23 Werner Lemberg <wl@gnu.org>
1854 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
1856 While the current code in `FT_Get_Next_Char' correctly rejects
1857 out-of-bounds glyph indices, it can be extremely slow for malformed
1858 cmaps that use 32bit values. This commit tries to improve that.
1860 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
1861 tt_cmap12_char_map_binary, tt_cmap13_next,
1862 tt_cmap13_char_map_binary): Reject glyph indices larger than or
1863 equal to the number of glyphs.
1865 2015-09-23 Werner Lemberg <wl@gnu.org>
1867 [base, sfnt] Better checks for invalid cmaps (1/2).
1869 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
1871 (FT_Get_First_Char): Updated.
1873 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
1874 codes greater than 0xFFFF.
1876 (tt_cmap8_char_index): Avoid integer overflow in computation of
1878 (tt_cmap8_char_next): Avoid integer overflows in computation of
1879 both next character code and glyph index.
1881 (tt_cmap10_char_index): Fix unsigned integer logic.
1882 (tt_cmap10_char_next): Avoid integer overflow in computation of
1883 next character code.
1885 (tt_cmap12_next): Avoid integer overflows in computation of both
1886 next character code and glyph index.
1887 (tt_cmap12_char_map_binary): Ditto.
1888 (tt_cmap12_char_next): Simplify.
1890 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
1891 of next character code.
1892 (tt_cmap13_char_next): Simplify.
1894 2015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1896 [base] Check too long POST and sfnt resource (#45919).
1898 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
1899 resource fork for Mac OS. Resource forks larger than 16 MB can be
1900 written but can't be handled correctly, at least in Carbon routine.
1901 See https://support.microsoft.com/en-us/kb/130437.
1903 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
1904 prefix for `%p' formatter.
1906 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
1907 total size of the concatenated POST resource before buffer
1909 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
1910 before buffer allocation.
1912 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
1913 total resource size before buffer allocation.
1915 2015-09-19 Werner Lemberg <wl@gnu.org>
1917 [sfnt] Improve handling of invalid SFNT table entries (#45987).
1919 This patch fixes weaknesses in function `tt_face_load_font_dir'.
1921 - It incorrectly assumed that valid tables are always at the
1922 beginning. As a consequence, some valid tables after invalid
1923 entries (which are ignored) were never seen.
1925 - Duplicate table entries (this is, having the same tag) were not
1928 - The number of valid tables was sometimes too large, leading to
1929 access of invalid tables.
1931 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
1933 Add another tracing message.
1934 (tt_face_load_font_dir): Only allocate table array for valid
1935 entries as returned by `check_table_dir'.
1936 Reject duplicate tables and adjust number of valid tables
1939 2015-09-19 Werner Lemberg <wl@gnu.org>
1941 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
1943 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
1944 then take the absolute value.
1945 Also apply FT_ABS to `height'.
1947 2015-09-17 Werner Lemberg <wl@gnu.org>
1949 [type42] Fix memory leak (#45989).
1951 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
1952 `CharStrings' array.
1954 2015-09-17 Werner Lemberg <wl@gnu.org>
1956 [psaux] Fix memory leak (#45986).
1958 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1959 Free `temp' in case of error.
1961 2015-09-17 Werner Lemberg <wl@gnu.org>
1963 [psaux] Improve tracing message.
1965 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1966 Handle plural correctly.
1968 2015-09-17 Werner Lemberg <wl@gnu.org>
1970 [pcf] Fix integer overflows (#45985).
1972 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
1974 2015-09-17 Werner Lemberg <wl@gnu.org>
1976 [pcf] Use FT_ABS for some property values (#45893).
1978 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
1979 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
1980 RESOLUTION_Y. In tracing mode, add warnings.
1982 2015-09-16 Werner Lemberg <wl@gnu.org>
1984 Minor fixes for some clang warnings.
1986 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
1989 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
1991 2015-09-15 Werner Lemberg <wl@gnu.org>
1993 [type1, type42] Fix memory leaks (#45966).
1995 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
1997 (parse_blend_design_map): Allow only a single design map.
1998 (parse_encoding): Handle multiple encoding vectors.
2000 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
2003 2015-09-15 Werner Lemberg <wl@gnu.org>
2005 [truetype] Fix integer type (#45965).
2007 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
2009 2015-09-15 Werner Lemberg <wl@gnu.org>
2011 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
2013 2015-09-15 Werner Lemberg <wl@gnu.org>
2015 [type1, type42] Check encoding array size (#45961).
2017 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
2018 (t42_parse_encoding): Do it.
2020 2015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2022 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
2024 2015-09-14 Werner Lemberg <wl@gnu.org>
2026 [type1] Fix another potential buffer overflow (#45955).
2028 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
2029 `eexec' doesn't exceed `limit'.
2031 2015-09-13 Werner Lemberg <wl@gnu.org>
2033 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
2035 * builds/unix/mkinstalldirs: Removed, no longer needed.
2037 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
2038 Update pwd call for `$INSTALL'.
2040 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
2042 * autogen.sh: Updated.
2044 2015-09-13 Werner Lemberg <wl@gnu.org>
2046 [winfonts] Check alignment shift count for resource data (#45938).
2048 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
2050 2015-09-13 Werner Lemberg <wl@gnu.org>
2052 [type1] Fix potential buffer overflow (#45923).
2054 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
2055 point to end of file buffer.
2057 2015-09-13 Werner Lemberg <wl@gnu.org>
2059 [gzip] Fix access of small compressed files (#45937).
2061 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
2063 (ft_gzip_get_uncompressed_file): Correct byte order while reading
2064 unsigned long value. Without this change, the whole optimization of
2065 accessing small files in `FT_Stream_OpenGzip' is never executed! As
2066 a consequence, access to PCF files in general (which are normally
2067 small files) should be much improved now as originally intended.
2069 2015-09-11 Werner Lemberg <wl@gnu.org>
2071 [psaux] Fix potential buffer overflow (#45922).
2073 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
2074 enclosed in balanced expressions, ensure that the cursor position
2075 doesn't get larger than the current limit.
2077 2015-09-11 Werner Lemberg <wl@gnu.org>
2079 [base] Avoid crash while tracing `load_mac_face'.
2081 Reported in Savannah bug #45919.
2083 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
2086 2015-09-11 Werner Lemberg <wl@gnu.org>
2088 [type42] Fix endless loop (#45920).
2090 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
2091 type1's `parse_encoding'.
2093 2015-09-10 Werner Lemberg <wl@gnu.org>
2095 [docmaker] Allow `-' in bold and italic markup.
2097 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
2100 2015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
2102 * src/base/ftcalc.c (FT_RoundFix): Improve.
2104 2015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
2106 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
2108 This commit makes the functions behave as expected, this is,
2109 rounding towards plus or minus infinity.
2111 2015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
2113 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
2115 2015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
2117 [raster,smooth] Microoptimizations.
2119 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
2120 Beziier_Up, ): Use do-while loops.
2122 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
2123 gray_convert_glyph): Ditto.
2125 2015-09-04 Werner Lemberg <wl@gnu.org>
2127 [autofit] Redesign code ranges (2/2).
2129 This commit adds two fallback scripts (`latb', `latp') and
2130 implements support for the no-base character ranges introduced in
2131 the previous commit.
2133 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
2134 `script_uni_nobase_ranges' field.
2135 (AF_DEFINE_SCRIPT_CLASS): Updated.
2137 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
2138 `latp' fallback scripts.
2140 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
2141 superscript fallback scripts.
2143 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2145 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
2147 (AF_STYLE_MASK): Updated.
2149 * src/autofit/afglobal.c (SCRIPT): Updated.
2150 (af_face_globals_compute_style_coverage): Handle new style flag.
2152 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
2155 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
2157 2015-09-04 Werner Lemberg <wl@gnu.org>
2159 [autofit] Redesign code ranges (1/2).
2161 This patch introduces auxiliary code ranges that identify no-base
2162 characters; they refer to glyphs of a script that should be hinted
2163 without alignments to blue zones (mostly diacritics).
2165 It also splits off ranges for fallback scripts that handle subscript
2166 and superscript characters not covered by OpenType features. For
2167 example, this greatly helps improve the hinting of various phonetic
2168 alphabets, which contain a large amount characters that look like
2171 Finally, code ranges are updated to Unicode 8.0, and enclosed
2172 characters are removed in general since they normally look better if
2175 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
2177 Split off superscript-like and subscript-like glyphs into...
2179 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
2181 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
2182 of the corresponding character ranges.
2184 2015-09-03 Werner Lemberg <wl@gnu.org>
2186 [autofit] Pass glyph index to hinting function.
2188 No functionality change yet.
2190 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
2193 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
2194 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
2195 (af_indic_hints_apply), src/autofit/aflatin.c
2196 (af_latin_hints_apply), src/autofit/aflatin2.c
2197 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
2200 2015-08-30 Werner Lemberg <wl@gnu.org>
2202 [autofit] Code clean-up.
2204 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
2205 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
2207 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2210 2015-08-30 Werner Lemberg <wl@gnu.org>
2212 [autofit] Make glyph style array use 16bit values.
2214 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
2215 `FT_UShort' for `map' field.
2217 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
2218 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
2219 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
2221 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
2223 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
2225 2015-08-26 Werner Lemberg <wl@gnu.org>
2227 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
2229 2015-08-25 Werner Lemberg <wl@gnu.org>
2231 [base] Improve kerning tracing and documentation.
2233 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
2234 scaled-down kerning values differ.
2236 2015-08-18 Werner Lemberg <wl@gnu.org>
2238 [raster] Remove last remnants of `raster5' driver.
2240 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
2242 * src/raster/rastpic.c, src/raster/rastpic.h
2243 (ft_raster5_renderer_class_pic_init,
2244 ft_raster5_renderer_class_pic_free): Removed.
2246 2015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2248 [base] Improve emboldener (#45596).
2250 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
2251 of zero-lenght segments.
2253 2015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
2255 [base] Reoptimize arithmetic.
2257 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
2258 special cases that slow down the general use.
2260 2015-08-15 pazer <ibemad@gmail.com>
2262 Fix C++ compilation (#45762).
2264 * src/base/ftstroke.c (ft_outline_glyph_class): Use
2267 2015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2269 [truetype] Clean up.
2271 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
2272 `FT_Outline_Transform' and `FT_Outline_Translate'.
2273 (translate_array): Dropped.
2275 2015-08-14 Andreas Enge <andreas.enge@inria.fr>
2277 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
2279 2015-08-13 Werner Lemberg <wl@gnu.org>
2281 [truetype] Introduce named instance access to GX fonts.
2283 For functions querying a face, bits 16-30 of the face index can hold
2284 the named instance index if we have a GX font. The indices start
2285 with value 1; value 0 indicates font access without GX variation
2288 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
2289 * include/freetype/internal/sfnt.h: Ditto.
2291 * src/sfnt/sfobjs.c (sfnt_init_face)
2292 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
2294 (sfnt_load_face): Updated.
2296 * src/truetype/ttobjs.c (tt_face_init)
2297 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
2300 * src/base/ftobjs.c (open_face_from_buffer,
2301 open_face_PS_from_sfnt_stream): Updated.
2302 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
2303 * src/cff/cffload.c (cff_font_load): Updated.
2305 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
2306 pure CFF fonts if `font_index < 0'.
2309 * src/cid/cidobjs.c (cid_face_init): Updated.
2310 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
2311 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
2312 * src/type1/t1objs.c (T1_Face_Init): Updated.
2313 * src/type42/t42objs.c (T42_Face_Init): Updated.
2314 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
2317 * docs/CHANGES: Updated.
2319 2015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2321 [type1,cff,cid] Streamline font matrix application.
2323 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
2324 if font matrix is not trivial.
2325 * src/cff/cffgload.c (cff_slot_load): Ditto.
2326 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
2329 2015-08-11 Werner Lemberg <wl@gnu.org>
2331 [builds/unix] Minor.
2333 * builds/unix/configure.raw:
2334 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
2335 similarly named uppercase variables.
2337 2015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2339 [type1,cid,type42] Minor improvements.
2341 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
2342 when necessary. Refresh comments.
2343 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
2344 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
2346 2015-08-08 Werner Lemberg <wl@gnu.org>
2348 [type42] Fix glyph access.
2350 This is a severe bug: We've missed one level of indirection, as
2351 described in the Type 42 specification. As a result, ftview
2352 sometimes showed incorrect glyphs for given glyph names, and even
2353 displayed `error 0x0006' (invalid argument!) in case the number of
2354 glyph indices differed between the Type 42 font and the embedded
2357 Apparently, noone ever noticed it; this shows how much Type 42 fonts
2360 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
2361 to embedded TTF's glyph index.
2363 2015-08-08 Werner Lemberg <wl@gnu.org>
2365 [type42] Minor clean-up.
2367 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
2370 2015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
2372 [type42] Parse FontMatrix according to specifications.
2374 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
2375 does not need scaling by 1000. Units_per_EM are taken from the
2378 2015-08-06 Werner Lemberg <wl@gnu.org>
2380 [autofit] Improve Arabic hinting.
2382 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
2385 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
2388 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2390 2015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
2392 [truetype] Clean up types.
2394 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
2395 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
2396 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
2397 * src/truetype/ttgload.c: Remove corresponding type casts.
2398 * src/truetype/ttsubpix.c: Ditto.
2400 2015-08-05 Werner Lemberg <wl@gnu.org>
2402 [autofit] Improve recognition of flat vs. rounded segments.
2404 Lower the flatness threshold from upem/8 to upem/14, making the
2405 auto-hinter accept shorter elements.
2407 Synchronize flat/round stem selection algorithm with blue zone code.
2409 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
2410 (af_latin_metrics_init_blues): Use it.
2411 (af_latin_hints_compute_segments): Collect information on maximum
2412 and minimum coordinates of `on' points; use this to add a constraint
2413 for the flat/round decision similar to
2414 `af_latin_metrics_init_blues'.
2416 2015-08-04 Werner Lemberg <wl@gnu.org>
2418 Another left-shift bug (#45681).
2420 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
2423 2015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2425 [base] Fix `ft_corner_orientation'.
2427 Remove casting from `FT_Long' to `FT_Int' that might change the sign
2428 of the return value and make it faster too.
2430 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
2431 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
2432 * src/pshinter/pshalgo.c: Remove old unused code.
2434 2015-08-03 Werner Lemberg <wl@gnu.org>
2436 * src/truetype/ttgload.c (load_truetype_glyph)
2437 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
2438 having a depth greater than 1.
2440 2015-08-03 Werner Lemberg <wl@gnu.org>
2442 Fix typo in clang bug from 2015-07-31 (#45678).
2444 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
2446 2015-08-02 Werner Lemberg <wl@gnu.org>
2448 * CMakeLists.txt: Improve shared library support.
2450 Based on a patch from John Cary <cary@txcorp.com>.
2452 2015-08-02 Werner Lemberg <wl@gnu.org>
2454 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
2456 2015-08-02 Werner Lemberg <wl@gnu.org>
2458 Fix more invalid left-shifts.
2460 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
2463 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2464 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
2467 2015-07-31 Werner Lemberg <wl@gnu.org>
2469 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
2471 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
2472 positive values from header.
2475 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
2478 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
2479 _bdf_clear_glyph_modified): Use unsigned long constant.
2481 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
2482 left-shift values that can be negative.
2484 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
2485 left-shift values that can be negative.
2487 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
2490 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
2491 values that can be negative.
2493 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2494 compute_glyph_metrics, load_sbit_image): Don't left-shift values
2495 that can be negative.
2497 2015-07-31 Werner Lemberg <wl@gnu.org>
2501 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
2502 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
2504 2015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2506 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
2508 2015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
2510 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
2512 2015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
2514 [cff] Don't use `hmtx' table for LSB (#45520).
2516 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
2517 width only. Bug introduced 2015-04-10.
2519 2015-07-09 Werner Lemberg <wl@gnu.org>
2521 Better support of user-supplied C++ namespaces.
2525 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
2529 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
2530 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
2531 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
2532 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
2533 header files that contain FT_{BEGIN,END}_HEADER macros by
2536 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
2537 FT_CONFIG_STANDARD_LIBRARY_H earlier.
2539 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2541 2015-07-07 Werner Lemberg <wl@gnu.org>
2543 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
2545 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
2547 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
2549 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
2551 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
2552 * src/sfnt/sfobjs.h: Add prototype for it.
2554 2015-06-30 Werner Lemberg <wl@gnu.org>
2556 Fix some clang compiler warnings.
2558 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
2559 (cf2_interpT2CharString), src/truetype/ttgload.c
2560 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
2561 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
2563 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2565 [truetype] Speed up bytecode interpreter.
2567 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
2569 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2571 [base] Speed up emboldening.
2573 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
2574 `FT_Vector_NormLen'.
2576 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2578 [base] Implement fast vector normalization.
2580 The function uses Newton's iterations instead of dividing vector
2581 components by its length, which needs a square root. This is,
2582 literally, a bit less accurate but a lot faster.
2584 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
2586 2015-06-28 Werner Lemberg <wl@gnu.org>
2588 * CMakeLists.txt: Always create `ftconfig.h'.
2590 For non-UNIX builds, the file stays unmodified. However, it's
2591 better to have the main configuration files at the same place
2592 regardless of the OS.
2594 2015-06-28 Werner Lemberg <wl@gnu.org>
2596 * CMakeLists.txt: Improve MSVC support (#43737).
2598 2015-06-28 Werner Lemberg <wl@gnu.org>
2600 [cmake] Check for libraries and create `ftoption.h'.
2602 * builds/FindHarfBuzz.cmake: New file, taken from
2604 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
2606 * CMakeLists.Txt: Add path to local cmake modules.
2607 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
2608 Create `ftoption.h' file.
2609 Set up include and linker stuff for libraries.
2611 2015-06-28 Werner Lemberg <wl@gnu.org>
2613 * CMakeLists.txt: Fix creation of `ftconfig.h'.
2614 Check for UNIX header files using `check_include_file'.
2615 Set up correct header include directories.
2617 2015-06-28 Werner Lemberg <wl@gnu.org>
2619 * CMakeLists.txt: Disallow in-source builds.
2621 2015-06-27 Werner Lemberg <wl@gnu.org>
2623 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
2625 2015-06-26 Werner Lemberg <wl@gnu.org>
2627 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
2629 2015-06-25 Werner Lemberg <wl@gnu.org>
2631 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
2632 Additionally, do this for UNIX only.
2634 2015-06-25 Werner Lemberg <wl@gnu.org>
2636 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
2638 2015-06-25 Werner Lemberg <wl@gnu.org>
2640 Another adjustment to header locations.
2642 This change is a result of a discussion thread on freetype-devel
2644 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
2646 Re-introduce the `freetype2' subdirectory for all FreeType header
2647 files after installation, and rename the `freetype2' subdirectory in
2648 the git repository to `freetype'.
2650 * include/freetype2: Renamed to...
2651 * include/freetype: This.
2653 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
2654 PRIVATE_HEADERS): Updated.
2655 Update creation of `ftconfig.h'.
2656 Install generated `ftconfig.h'.
2658 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
2660 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
2661 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
2662 builds/unix/freetype2.in: Updated.
2664 * builds/unix/freetype-config.in: Updated.
2665 * builds/unix/configure.raw: Don't check for `rmdir'.
2666 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
2667 according to the autoconf info manual.
2668 * builds/unix/install.mk (install, uninstall,
2669 distclean_project_unix): Update and simplify.
2671 * builds/wince/*, builds/windows/*: Updated.
2673 * devel/ft2build.h, include/ft2build.h: Updated.
2675 * include/freetype2/config/ftheader.h,
2676 include/freetype2/internal/ftserv.h,
2677 include/freetype2/internal/internal.h: Update all header file
2680 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
2684 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2686 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
2688 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2690 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
2692 2015-06-23 Werner Lemberg <wl@gnu.org>
2694 s/TYPEOF/FT_TYPEOF/ (#45376).
2696 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
2697 include/freetype2/config/ftconfig.h,
2698 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
2700 2015-06-22 Werner Lemberg <wl@gnu.org>
2702 Fix Savannah bug #45097.
2704 We no longer `pollute' the namespace of possible header file names;
2705 instead we move `ft2build.h' up by one level so that it gets
2706 installed in the default include directory (e.g.,
2707 /usr/local/include). After this commit, only `ft2build.h' stays in
2708 the compiler's include path.
2710 No visible changes for the user who follows the standard FreeType
2711 header inclusion rules.
2713 * include/*: Move to ...
2714 * include/freetype2/*: This directory, except `ft2build.h'.
2716 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
2717 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
2719 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
2720 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
2721 builds/unix/install.mk (install, uninstall),
2722 builds/unix/freetype2.in: Updated.
2724 * builds/unix/freetype-config.in: Updated.
2725 Emit -I directory only if it is not `/usr/include'.
2727 * builds/wince/*, builds/windows/*: Updated.
2729 * devel/ft2build.h, include/ft2build.h: Updated.
2731 * include/freetype2/config/ftheader.h,
2732 include/freetype2/internal/ftserv.h,
2733 include/freetype2/internal/internal.h: Update all header file
2736 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
2738 2015-06-21 Werner Lemberg <wl@gnu.org>
2740 Make Jam support work again.
2742 This is just very basic stuff and just a little bit tested on
2743 GNU/Linux only. I won't delve into this since I'm not a Jam user.
2745 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
2746 (DEFINES): Replace with...
2747 (CCFLAGS): ... this.
2749 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
2750 already handled in the top-level Jamfile.
2752 * src/autofit/Jamfile (DEFINES): Replace with...
2753 (CCFLAGS): ... this.
2754 (_sources): Add missing files.
2756 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
2757 longer contains macro header definitions.
2759 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
2760 src/truetype/Jamfile (_sources): Add missing files.
2762 2015-06-16 Werner Lemberg <wl@gnu.org>
2764 Fix Savannah bug #45326.
2766 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
2769 2015-06-07 Werner Lemberg <wl@gnu.org>
2771 * Version 2.6 released.
2772 =======================
2775 Tag sources with `VER-2-6'.
2777 * docs/VERSION.DLL: Update documentation and bump version number to
2780 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2781 builds/windows/vc2005/index.html,
2782 builds/windows/vc2008/freetype.vcproj,
2783 builds/windows/vc2008/index.html,
2784 builds/windows/vc2010/freetype.vcxproj,
2785 builds/windows/vc2010/index.html,
2786 builds/windows/visualc/freetype.dsp,
2787 builds/windows/visualc/freetype.vcproj,
2788 builds/windows/visualc/index.html,
2789 builds/windows/visualce/freetype.dsp,
2790 builds/windows/visualce/freetype.vcproj,
2791 builds/windows/visualce/index.html,
2792 builds/wince/vc2005-ce/freetype.vcproj,
2793 builds/wince/vc2005-ce/index.html,
2794 builds/wince/vc2008-ce/freetype.vcproj,
2795 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
2797 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
2798 (FREETYPE_PATCH): Set to 0.
2800 * builds/unix/configure.raw (version_info): Set to 18:0:12.
2801 * CMakeLists.txt (VERSION_MINOR): Set to 6.
2802 (VERSION_PATCH): Set to 0.
2804 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
2805 declarations for dumping functions.
2807 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
2809 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
2811 Don't include a zero patch level in version string.
2812 * builds/freetype.mk: Remove code for computing the version string.
2814 2015-06-06 Ashish Azad <ashish.azad@samsung.com>
2816 Fix Savannah bug #45260.
2818 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
2820 2015-06-03 Werner Lemberg <wl@gnu.org>
2822 [truetype] Fix memory leak.
2824 Problem reported by Grissiom <chaos.proton@gmail.com>; in
2826 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
2828 there is an example code to trigger the bug.
2830 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
2831 data before allocating again. Bug most probably introduced four
2832 years ago in version 2.4.3.
2834 2015-06-02 Werner Lemberg <wl@gnu.org>
2836 [raster] Add more tracing.
2838 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
2839 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
2840 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
2842 2015-06-01 Werner Lemberg <wl@gnu.org>
2844 [truetype] While tracing opcodes, show code position and stack.
2846 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
2848 (opcode_name): Add string lengths.
2849 (TT_RunIns): Implement display of code position and stack.
2851 2015-05-31 Werner Lemberg <wl@gnu.org>
2853 [truetype] In GX, make private point numbers work correctly.
2855 This is completely missing in Apple's documentation: If a `gvar'
2856 tuple uses private point numbers (this is, deltas are specified for
2857 some points only), the uncovered points must be interpolated for
2858 this tuple similar to the IUP bytecode instruction. Examples that
2859 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
2861 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
2862 tt_handle_deltas): New functions.
2863 (TT_Vary_Get_Glyph_Deltas): Renamed to...
2864 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
2865 points and does no longer return an array of deltas.
2866 Add tracing information.
2867 Call `tt_handle_deltas' to interpolate missing deltas.
2868 Also fix a minor memory leak in case of error.
2870 * src/truetype/ttgxvar.h: Updated.
2872 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
2873 load_truetype_glyph): Updated.
2875 2015-05-31 Werner Lemberg <wl@gnu.org>
2877 [truetype] In GX, make intermediate tuplets work at extrema.
2879 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
2881 2015-05-31 Werner Lemberg <wl@gnu.org>
2883 [truetype] Add tracing information to GX code.
2885 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2886 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
2887 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
2889 2015-05-28 Werner Lemberg <wl@gnu.org>
2891 * src/tools/apinames.c (names_dump): Fix invalid reference.
2893 Problem reported by Guzman Mosqueda, Jose R
2894 <jose.r.guzman.mosqueda@intel.com>.
2896 2015-05-24 Werner Lemberg <wl@gnu.org>
2898 [truetype] Fix commit from 2015-05-22.
2900 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
2901 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
2903 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
2905 2015-05-23 Werner Lemberg <wl@gnu.org>
2907 [truetype] Fix return values of GETINFO bytecode instruction.
2909 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
2910 `vertical_lcd' and `gray_cleartype'.
2912 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
2913 Change `symmetrical smoothing' to TRUE, since FreeType produces
2916 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
2917 values for symmetrical smoothing, namely 11/18.
2918 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
2921 2015-05-23 Werner Lemberg <wl@gnu.org>
2925 * src/truetype/ttinterp.h (TT_ExecContext):
2926 s/subpixel/subpixel_hinting.
2928 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
2930 2015-05-22 Werner Lemberg <wl@gnu.org>
2932 [truetype] Support selector index 3 of the INSTCTRL instruction.
2934 This flag activates `native ClearType hinting', disabling backwards
2935 compatibility mode as described in Greg Hitchcocks whitepaper. In
2936 other words, it enables unrestricted functionality of all TrueType
2937 instructions in ClearType.
2939 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
2941 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
2942 `GS.instruct_control' is active.
2944 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
2945 (Ins_GETINFO): Updated.
2947 * docs/CHANGES: Document it.
2949 2015-05-20 Werner Lemberg <wl@gnu.org>
2953 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
2956 2015-05-17 Werner Lemberg <wl@gnu.org>
2958 [truetype] Fix loading of composite glyphs.
2960 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
2961 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
2962 unsigned. I trust `ttx' (which has exactly such code) that it does
2963 the right thing here...
2965 The reason that noone has ever noticed this bug is probably the fact
2966 that point-aligned subglyphs are rare, as are subglyphs with a
2967 number of points in the range [128;255], which is quite large (or
2968 even in the range [32768;65535], which is extremely unlikely).
2970 2015-05-12 Chris Liddell <chris.liddell@artifex.com>
2972 [cff] Make the `*curveto' operators more tolerant.
2974 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
2975 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
2976 pulling values off the stack until the stack is exhausted.
2977 Implicitly the stack must be a multiple (or for subtly different
2978 behaviour) a multiple plus a specific number of extra values deep.
2979 If that's not the case, enforce it (as the old code did).
2981 2015-05-12 Chris Liddell <chris.liddell@artifex.com>
2983 [cff] fix incremental interface with new cff code.
2985 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
2986 interface to retrieve glyph data for a SEAC, it be left to the
2987 incremental interface callback to apply the encoding to raw
2988 character index (as it was in the previous code).
2990 2015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2992 [autofit] Speed up IUP.
2994 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
2995 the same position from true interpolation, use `scale' to reduce
2998 2015-04-28 Werner Lemberg <wl@gnu.org>
3000 [cff] Use `name' table for PS name if we have a SFNT-CFF.
3002 This follows the OpenType 1.7 specification. See
3004 http://tug.org/pipermail/tex-live/2015-April/036634.html
3008 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
3011 2015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
3013 [truetype] Speed up IUP.
3015 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
3016 snapping to the same position from true interpolation.
3018 2015-04-21 Werner Lemberg <wl@gnu.org>
3020 [autofit] By default, enable warping code but switch off warping.
3022 Suggested by Behdad.
3024 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
3026 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
3029 2015-04-21 Werner Lemberg <wl@gnu.org>
3031 * docs/CHANGES: Updated.
3033 2015-04-21 Werner Lemberg <wl@gnu.org>
3035 [autofit] Introduce `warping' property.
3037 This code replaces the debugging hook from the previous commit with
3038 a better, more generic solution.
3040 * include/ftautoh.h: Document it.
3042 * src/autofit/afmodule.h (AF_ModuleRec)
3043 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
3045 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
3046 (af_property_set, af_property_get, af_autofitter_init)
3047 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
3049 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
3050 longer existing `_af_debug_disable_warper'.
3052 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
3053 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
3054 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
3055 scaler flags if warping is off.
3057 * src/autofit/aftypes.h: Updated.
3059 2015-04-16 Werner Lemberg <wl@gnu.org>
3061 [autofit] Add debugging hook to disable warper.
3063 * src/autofit/afmodule.c (_af_debug_disable_warper)
3064 [FT_DEBUG_AUTOFIT]: New global variable.
3066 * src/autofit/aftypes.h: Updated.
3067 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
3069 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
3071 * src/autofi/aflatin.c (af_latin_hints_apply)
3072 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
3075 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
3076 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
3078 * src/autofit/aflatin2.c (af_latin2_hints_apply)
3079 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
3081 2015-04-10 Werner Lemberg <wl@gnu.org>
3083 [cff] Update advance width handling to OpenType 1.7.
3085 Problem reported by Behdad.
3087 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
3090 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
3091 bearing values from `hmtx' table if present.
3093 2015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3095 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
3097 2015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3099 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
3101 2015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3103 [autofit] Finish the thought.
3105 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
3106 is never negative so that its `FT_ABS' is not necessary.
3108 2015-04-01 Werner Lemberg <wl@gnu.org>
3110 [autofit] Call dumper functions for tracing.
3112 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
3113 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
3115 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
3117 2015-04-01 Werner Lemberg <wl@gnu.org>
3119 [autofit] Make debugging stuff work again.
3121 The interface to ftgrid was broken in the series of commits starting
3124 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
3128 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
3129 Use a global AF_GlyphHintsRec object for debugging.
3130 (af_autofitter_done, af_autofitter_load_glyph): Updated.
3132 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
3134 2015-04-01 Werner Lemberg <wl@gnu.org>
3136 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
3138 2015-03-29 Werner Lemberg <wl@gnu.org>
3140 [cff] Fix Savannah bug #44629.
3142 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
3143 (CFF_MAX_SUBRS_CALLS): Set to 16.
3145 2015-03-29 Werner Lemberg <wl@gnu.org>
3147 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
3149 This commit allows `num_coords' to be larger or smaller than the
3150 number of available axes while selecting a design instance, either
3151 ignoring excess data or using defaults if data is missing.
3153 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
3156 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
3157 T1_Set_Var_Design): Ditto.
3159 2015-03-29 Werner Lemberg <wl@gnu.org>
3163 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
3165 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
3167 2015-03-27 Werner Lemberg <wl@gnu.org>
3169 [cff] Trace charstring nesting levels.
3171 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
3172 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
3174 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3175 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
3177 2015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3179 [base] Optimize `FT_Angle_Diff'.
3181 Under normal circumstances we are usually close to the desired range
3182 of angle values, so that the remainder is not really necessary.
3184 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
3186 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
3188 2015-03-21 Werner Lemberg <wl@gnu.org>
3190 [truetype] Improve `gvar' handling.
3192 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
3193 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
3196 2015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3198 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
3200 2015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3202 Fix Savannah bug #44412 (part 2).
3204 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
3206 2015-03-11 Werner Lemberg <wl@gnu.org>
3208 [autofit] Add support for Arabic script.
3210 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
3212 * src/autofit/afblue.dat: Add blue zone data for Arabic.
3214 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3216 * src/autofit/afscript.h: Add Arabic standard characters.
3218 * src/autofit/afranges.c: Add Arabic data.
3220 * src/autofit/afstyles.h: Add Arabic data.
3222 * docs/CHANGES: Document it.
3224 2015-03-11 Werner Lemberg <wl@gnu.org>
3226 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
3228 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
3230 (FT_SERVICE_FONT_FORMAT_H): This.
3232 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
3234 (FT_FONT_FORMAT_*): This.
3236 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
3237 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
3238 src/truetype/ttdriver.c, src/type1/t1driver.c,
3239 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
3241 2015-03-11 Werner Lemberg <wl@gnu.org>
3243 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
3245 * include/config/ftheader.h: Implement it.
3246 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
3248 2015-03-11 Werner Lemberg <wl@gnu.org>
3250 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
3252 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
3254 * docs/CHANGES: Updated.
3256 2015-03-11 Werner Lemberg <wl@gnu.org>
3258 Fix automatic copyright updating.
3260 * src/tools/update-copyright: Make scanning of `no-copyright'
3263 * src/tools/no-copyright: Don't include README in general.
3265 2015-03-11 Werner Lemberg <wl@gnu.org>
3267 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
3269 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
3270 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
3271 builds/mac/FreeType.m68k_far.make.txt,
3272 builds/mac/FreeType.ppc_carbon.make.txt,
3273 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
3274 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
3275 builds/wince/vc2008-ce/freetype.vcproj,
3276 builds/windows/vc2005/freetype.vcproj,
3277 builds/windows/vc2008/freetype.vcproj,
3278 builds/windows/vc2010/freetype.vcxproj,
3279 builds/windows/vc2010/freetype.vcxproj.filters,
3280 builds/windows/visualc/freetype.dsp,
3281 builds/windows/visualc/freetype.vcproj,
3282 builds/windows/visualce/freetype.dsp,
3283 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
3284 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
3285 src/base/ftfntfmt.c, vms_make.com: Updated.
3287 2015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3289 Fix Savannah bug #44412 (part 1).
3291 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
3293 2015-03-10 Werner Lemberg <wl@gnu.org>
3295 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
3297 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
3300 * docs/CHANGES: Updated.
3302 2015-03-06 Werner Lemberg <wl@gnu.org>
3304 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
3308 2015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
3310 * src/base/ftstroke.c: Simplify.
3312 2015-03-04 Werner Lemberg <wl@gnu.org>
3314 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
3316 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
3317 of `point_cnt' if two bytes are read.
3318 Use a more vertical coding style.
3319 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
3320 Use a more vertical coding style.
3322 2015-03-03 Werner Lemberg <wl@gnu.org>
3324 [autofit] Fix Savannah bug #44241.
3326 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
3327 with less than 3 points.
3329 2015-03-02 Werner Lemberg <wl@gnu.org>
3331 Simplify `TYPEOF' macro.
3333 No need for two arguments.
3335 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3336 builds/vms/ftconfig.h (TYPEOF): Updated.
3338 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3339 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
3341 2015-03-01 Werner Lemberg <wl@gnu.org>
3343 Various compiler warning fixes for `make multi'.
3345 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
3346 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
3347 af_latin_hint_edges), src/autofit/aflatin2.c
3348 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
3351 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
3353 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
3354 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
3356 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
3357 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
3359 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
3361 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
3363 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
3366 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
3368 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
3370 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
3371 * src/truetype/ttsubpix.c (is_member_of_family_class,
3372 is_member_of_style_class): Declare as `static'.
3374 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
3376 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
3378 (T1_FIELD_COUNT): Removed. Unused.
3379 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
3381 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
3383 2015-02-25 Werner Lemberg <wl@gnu.org>
3385 [psaux] Signedness fixes.
3387 * include/internal/psaux.h, src/psaux/afmparse.c,
3388 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
3389 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
3391 2015-02-25 Werner Lemberg <wl@gnu.org>
3393 [otvalid] Signedness fixes.
3395 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
3396 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
3399 2015-02-25 Werner Lemberg <wl@gnu.org>
3401 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
3403 2015-02-25 Werner Lemberg <wl@gnu.org>
3405 [lzw] Signedness fixes.
3407 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
3409 2015-02-25 Werner Lemberg <wl@gnu.org>
3411 [gxvalid] Signedness fixes.
3413 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
3414 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
3415 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
3416 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
3417 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
3418 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
3419 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
3421 2015-02-25 Werner Lemberg <wl@gnu.org>
3423 [cache] Signedness fixes.
3425 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
3426 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
3428 2015-02-25 Werner Lemberg <wl@gnu.org>
3430 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
3432 This doesn't break ABI.
3434 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
3435 `width' and `height'.
3437 * docs/CHANGES: Document it.
3439 2015-02-25 Werner Lemberg <wl@gnu.org>
3441 [cache] Don't use `labs'.
3443 This is the only place in FreeType where this function was used.
3445 * include/config/ftstdlib.h (ft_labs): Remove.
3447 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
3450 2015-02-23 Werner Lemberg <wl@gnu.org>
3452 [cache] Replace `FT_PtrDist' with `FT_Offset'.
3454 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
3455 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
3456 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
3457 causing zillions of signedness warnings. [Note that `hash' was of
3458 type `FT_UInt32' before the change to `FT_PtrDist'.]
3461 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
3462 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
3464 2015-02-23 Werner Lemberg <wl@gnu.org>
3466 [smooth, raster] Re-enable standalone compilation.
3468 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
3469 [_STANDALONE_]: Define macros.
3471 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
3472 FT_HYPOT) [_STANDALONE_]: Define macros.
3474 2015-02-22 Werner Lemberg <wl@gnu.org>
3476 [smooth] Signedness fixes.
3478 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
3480 2015-02-22 Werner Lemberg <wl@gnu.org>
3482 * src/raster/ftraster.c: Use the file's typedefs everywhere.
3484 2015-02-22 Werner Lemberg <wl@gnu.org>
3486 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
3488 Bug introduced 6 commits earlier.
3490 2015-02-22 Werner Lemberg <wl@gnu.org>
3492 [pshinter] Fix thinko.
3494 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
3496 Bug introduced two commits earlier.
3498 2015-02-22 Werner Lemberg <wl@gnu.org>
3500 [raster] Signedness fixes.
3502 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
3504 2015-02-22 Werner Lemberg <wl@gnu.org>
3506 [pshinter] Signedness fixes.
3508 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
3509 src/pshinter/pshrec.c: Apply.
3511 2015-02-22 Werner Lemberg <wl@gnu.org>
3513 [pshinter] Use macros for (unsigned) flags, not enumerations.
3515 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
3517 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
3519 2015-02-22 Werner Lemberg <wl@gnu.org>
3521 * src/pshinter/pshrec.c: Simplify.
3522 (ps_hints_open, ps_hints_stem): Remove switch statement.
3524 2015-02-22 Werner Lemberg <wl@gnu.org>
3526 [sfnt] Signedness fixes.
3528 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
3529 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
3530 src/sfnt/ttsbit.c: Apply.
3531 * src/sfnt/sfdriver.c: Apply.
3532 (sfnt_get_ps_name): Simplify.
3534 2015-02-22 Werner Lemberg <wl@gnu.org>
3536 [bdf] Signedness fixes.
3538 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
3539 src/bdf/bdflib.c: Apply.
3541 2015-02-22 Werner Lemberg <wl@gnu.org>
3543 * src/bdf/bdflib.c (_bdf_atous): New function.
3544 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
3546 2015-02-22 Werner Lemberg <wl@gnu.org>
3548 [pcf] Signedness fixes.
3550 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
3551 * src/pcf/pcfread.c: Apply.
3552 (pcf_get_encodings): Ignore invalid negative encoding offsets.
3554 2015-02-21 Werner Lemberg <wl@gnu.org>
3556 * src/winfonts/winfnt.c: Signedness fixes.
3558 2015-02-21 Werner Lemberg <wl@gnu.org>
3560 [type42] Signedness fixes.
3562 * src/type42/t42parse.c, src/type42/t42parse.h,
3563 src/type42/t42types.h: Apply.
3565 2015-02-21 Werner Lemberg <wl@gnu.org>
3567 [pfr] Signedness fixes.
3569 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
3570 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
3571 src/pfr/pfrtypes.h: Apply.
3573 2015-02-21 Werner Lemberg <wl@gnu.org>
3575 [cff] Minor signedness fixes related to last commit.
3577 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
3579 2015-02-20 Werner Lemberg <wl@gnu.org>
3581 [cff] Thinkos in bias handling.
3583 Only the final result is always positive.
3585 Bug introduced three commits earlier.
3587 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
3589 2015-02-20 Werner Lemberg <wl@gnu.org>
3591 [cid] Fix signedness issues and emit some better error codes.
3593 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
3594 src/cid/cidparse.h: Apply.
3595 * src/cid/cidload.c: Apply.
3596 (parse_fd_array): Reject negative values for number of dictionaries.
3597 * src/cid/cidparse.c: Apply.
3598 (cid_parser_new): Reject negative values for hex data length.
3600 2015-02-20 Werner Lemberg <wl@gnu.org>
3602 [cff] Signedness fixes for new engine.
3604 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
3605 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
3607 2015-02-20 Werner Lemberg <wl@gnu.org>
3609 [cff] Signedness fixes for basic infrastructure and old engine.
3611 * include/internal/pshints.h, src/cff/cffdrivr.c,
3612 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
3613 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
3615 2015-02-19 Werner Lemberg <wl@gnu.org>
3617 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
3619 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
3620 version exists), but some fonts set it incorrectly.
3622 Problem reported by Adam Twardoch <adam@fontlab.com>.
3624 2015-02-19 Werner Lemberg <wl@gnu.org>
3626 [cff] Emit better error code for invalid private dict size.
3628 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
3629 values for size and offset.
3631 2015-02-19 Werner Lemberg <wl@gnu.org>
3633 [autofit] Fix signedness issues.
3635 * src/autofit/afangles.c, src/autofit/afcjk.c,
3636 src/autofit/afglobal.c, src/autofit/afhints.c,
3637 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
3638 src/autofit/hbshim.c: Apply.
3640 2015-02-19 Werner Lemberg <wl@gnu.org>
3642 [autofit] Use macros for (unsigned) flags, not enumerations.
3644 This harmonizes with other code in FreeType (and reduces the number
3645 of necessary casts to avoid compiler warnings).
3647 * src/autofit/afblue.hin: Make flag macros unsigned.
3648 * src/autofit/afblue.h: Regenerated.
3650 * src/autofit/afcjk.h: Replace flag enumeration with macros.
3651 * src/autofit/afcjk.c: Updated.
3653 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
3655 * src/autofit/afhints.c: Updated.
3657 * src/autofit/aflatin.h: Replace flag enumerations with macros.
3658 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
3660 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
3662 2015-02-18 Werner Lemberg <wl@gnu.org>
3664 [type1] Fix signedness issues.
3666 * include/internal/psaux.h, include/internal/t1types.h,
3667 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
3668 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
3670 2015-02-18 Werner Lemberg <wl@gnu.org>
3672 [psaux, type1] Fix minor AFM issues.
3674 * include/internal/t1types.h (AFM_KernPairRec): Make indices
3677 (AFM_FontInfoRec): Make element counters unsigned.
3679 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
3682 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
3683 Reject negative values for number of kerning elements.
3685 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
3687 2015-02-18 Werner Lemberg <wl@gnu.org>
3689 Don't use `FT_PtrDist' for lengths.
3691 Use FT_UInt instead.
3693 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
3694 T1_DecoderRec): Do it.
3696 * include/internal/t1types.h (T1_FontRec): Ditto.
3698 * src/cid/cidload.c (cid_parse_dict): Updated.
3699 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
3700 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
3701 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
3702 parse_chharstrings, parse_dict): Ditto.
3703 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
3704 t42_parse_dict): Ditto.
3706 2015-02-18 Werner Lemberg <wl@gnu.org>
3708 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
3709 This handles negative values better, avoiding many casts.
3711 2015-02-17 Werner Lemberg <wl@gnu.org>
3713 [base] Fix Savannah bug #44284.
3715 * src/base/ftcalc.c (FT_MulFix): Typos.
3717 2015-02-17 Werner Lemberg <wl@gnu.org>
3719 [truetype] Finish compiler warning fixes for signedness issues.
3721 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
3722 src/truetype/ttsubpix.h: Apply.
3724 2015-02-17 Werner Lemberg <wl@gnu.org>
3726 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
3728 2015-02-17 Werner Lemberg <wl@gnu.org>
3730 [truetype] More signedness fixes.
3732 * include/internal/tttypes.h, src/truetype/ttinterp.h,
3733 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
3734 src/truetype/ttobjs.c: Apply.
3736 2015-02-17 Werner Lemberg <wl@gnu.org>
3738 [truetype] Various signedness fixes.
3740 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
3742 * src/truetype/ttgload.c: Apply.
3743 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
3744 while constructing advance height.
3746 2015-02-16 Werner Lemberg <wl@gnu.org>
3748 [base] Finish compiler warning fixes for signedness issues.
3750 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
3753 2015-02-16 Werner Lemberg <wl@gnu.org>
3755 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
3757 2015-02-16 Werner Lemberg <wl@gnu.org>
3759 More minor signedness warning fixes.
3761 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
3762 src/base/ftutil.c: Apply.
3764 2015-02-16 Werner Lemberg <wl@gnu.org>
3766 Next round of minor compiler warning fixes.
3768 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
3770 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
3772 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
3774 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
3777 2015-02-16 Werner Lemberg <wl@gnu.org>
3779 Various minor signedness fixes.
3781 * include/ftadvanc.h, include/internal/ftobjs.h,
3782 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
3784 2015-02-16 Werner Lemberg <wl@gnu.org>
3788 This helps suppress signedness warnings, avoiding issues with
3789 implicit conversion changes.
3791 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3792 builds/vms/ftconfig.h (TYPEOF): Define.
3794 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3795 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
3797 2015-02-16 Werner Lemberg <wl@gnu.org>
3799 * src/base/ftsystem.c: Use casts in standard C function wrappers.
3800 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
3802 2015-02-16 Werner Lemberg <wl@gnu.org>
3804 Fix Savannah bug #44261.
3806 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
3807 environment also while calling the configure script.
3809 2015-02-16 Werner Lemberg <wl@gnu.org>
3811 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
3812 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
3813 FT_MEM_MOVE): Do it.
3815 2015-02-15 Werner Lemberg <wl@gnu.org>
3817 [base] Clean up signedness issues in `ftdbgmem.c'.
3819 Also fix other minor issues.
3821 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
3822 with FT_Long for consistency.
3823 (ft_mem_primes): Change type to `FT_Int'.
3824 (ft_mem_closest_prime, ft_mem_table_set): Updated.
3826 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
3827 ft_mem_debug_realloc): Use `static' keyword and fix signedness
3828 warnings where necessary.
3830 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
3831 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
3832 and add or remove casts to avoid signedness warnings.
3834 2015-02-15 Werner Lemberg <wl@gnu.org>
3836 [base] Clean up signedness in arithmetic functions.
3838 This makes the code more readable and reduces compiler warnings.
3840 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
3841 FT_DivFix): Convert input parameters to unsigned, do the
3842 computation, then convert the result back to signed.
3843 (ft_corner_orientation): Fix casts.
3845 2015-02-07 Werner Lemberg <wl@gnu.org>
3847 [sfnt] Fix Savannah bug #44184.
3849 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
3850 longer reject `htmx' and `vmtx' tables with invalid length but
3853 2015-02-06 Jon Anderson <jon@websupergoo.com>
3855 [truetype] Fix regression in the incremental glyph loader.
3857 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
3858 fonts, the glyph index may be greater than the number of glyphs
3859 indicated, so guard the check with a preprocessor conditional.
3861 2015-02-06 Werner Lemberg <wl@gnu.org>
3863 [autofit] Fix potential memory leak.
3865 While this doesn't show up with FreeType, exactly the same code
3866 leaks with ttfautohint's modified auto-hinter code (which gets used
3867 in a slightly different way).
3869 It certainly doesn't harm since it is similar to already existing
3870 checks in the code for embedded arrays.
3872 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
3873 and `max_points' for all cases.
3875 2015-01-31 Werner Lemberg <wl@gnu.org>
3877 [autofit] Add support for Thai script.
3879 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
3882 * src/autofit/afblue.dat: Add blue zone data for Thai.
3884 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3886 * src/autofit/afscript.h: Add Thai standard characters.
3888 * src/autofit/afranges.c: Add Thai data.
3890 * src/autofit/afstyles.h: Add Thai data.
3892 2015-01-23 Behdad Esfahbod <behdad@behdad.org>
3894 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
3896 This fixes a breakage caused by the commit `[raster] Remove
3897 5-level gray AA mode from monochrome rasterizer.'.
3899 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
3901 * src/raster/ftraster.c (ft_black_render): Handle
3902 `FT_RASTER_FLAG_AA'.
3904 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
3907 2015-01-18 Werner Lemberg <wl@gnu.org>
3909 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
3911 2015-01-18 Chris Liddell <chris.liddell@artifex.com>
3913 [raster] Fix Savannah bug #44022.
3915 Add fallback for glyphs with degenerate bounding boxes.
3917 If a glyph has only one very narrow feature, the bbox can end up
3918 with either the width or height of the bbox being 0, in which case
3919 no raster memory is allocated and no attempt is made to render the
3920 glyph. This is less than ideal when the drop-out compensation in
3921 the rendering code would actually result in the glyph being
3924 This problem can be observed with the `I' glyph (gid 47) in the
3925 Autodesk RomanS TrueType font.
3927 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
3928 dimension is zero to explicitly round up/down (instead of simply
3931 2015-01-17 Werner Lemberg <wl@gnu.org>
3933 Add some tools to handle yearly copyright notice updates.
3935 We are now following the GNU guidelines: A new release automatically
3936 means that the copyright year of all affected files gets updated; it
3937 is no longer used to track years of modification changes.
3939 * src/tools/update-copyright-year: New Perl script.
3940 * src/tools/update-copyright: New shell script that calls
3941 `update-copyright-year' on all files.
3942 * src/tools/no-copyright: Exceptions that should not be handled by
3945 2015-01-14 Werner Lemberg <wl@gnu.org>
3947 * docs/CHANGES: Updated, using a description from Behdad.
3949 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3951 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
3953 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3955 [autofit] Add embedded array of segments and edges.
3957 Avoids multiple mallocs per typical glyphs.
3959 With this and recent changes to avoid mallocs, the thread-safe
3960 stack-based loader is now as fast as the previous model that had one
3963 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
3965 (AF_AxisHintsRec): Add two arrays for segments and edges.
3967 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
3968 data if number of segments exceeds given threshold value.
3969 (af_axis_hints_new_edge): Only allocate data if number of edges
3970 exceeds given threshold value.
3971 (af_glyph_hints_done): Updated.
3973 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3975 [autofit] Add embedded arrays for points and contours.
3977 This avoids at least two malloc calls for typical glyphs.
3979 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
3981 (AF_GlyphHintsRec): Add two arrays for contours and points.
3983 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
3985 (af_glyph_hints_reload): Only allocate data if number of contours or
3986 points exceeds given threshold values.
3988 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3990 [autofit] Allocate hints object on the stack.
3992 This avoids one malloc per load.
3994 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
3998 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
3999 parameter instead of `FT_Memory'.
4000 (af_loader_done): Directly reset `load_hints'.
4001 (af_loader_load_g): Updated.
4003 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
4006 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4008 [autofit] Reuse slot glyph loader.
4010 No need to create a new glyph loader; we can reuse the one from
4011 `slot->internal->loader'. It's hard to tell why it was written that
4012 way originally, but new code looks sound and correct to me, and
4013 avoids lots of allocations.
4015 * src/autofit/afloader.c (af_loader_init): Change return type to
4017 Don't call `FT_GlyphLoader_New'.
4018 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
4019 (af_loader_load_g): Update code to use `internal->loader', which
4020 doesn't need copying of data.
4022 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
4025 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
4027 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4029 [autofit] Remove (unused) support for composite glyphs.
4031 We never have to deal with composite glyphs in the autohinter, as
4032 those will be loaded into FORMAT_OUTLINE by the recursed
4033 `FT_Load_Glyph' function.
4035 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
4036 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
4039 /* resolve load flags dependencies */
4041 if ( load_flags & FT_LOAD_NO_RECURSE )
4042 load_flags |= FT_LOAD_NO_SCALE |
4043 FT_LOAD_IGNORE_TRANSFORM;
4045 if ( load_flags & FT_LOAD_NO_SCALE )
4047 load_flags |= FT_LOAD_NO_HINTING |
4050 load_flags &= ~FT_LOAD_RENDER;
4053 and as such the auto-hinter is never called. Thus, the recursion in
4054 `af_loader_load_g' never actually happens. So remove the depth
4057 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
4059 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
4060 (af_loader_load_glyph): Updated.
4062 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4064 [raster] Fix uninitialized memory access.
4066 Apparently `ras.cProfile' might be uninitialized. This will be the
4067 case if `ras.top == ras.cProfile->offset', as can be seen in
4068 `End_Profile'. The overshoot code introduced in a change `Fix B/W
4069 rasterization of subglyphs with different drop-out modes.' (from
4070 2009-06-18) violated this, accessing `ras.cProfile->flags'
4071 unconditionally just before calling `End_Profile' (which then
4072 detected that `cProfile' is uninitialized and didn't touch it).
4074 This was harmless, and was not detected by valgrind before because
4075 the objects were allocated on the `raster_pool', which was always
4076 initialized. With recent change to allocate raster buffers on the
4077 stack, valgrind now reported this invalid access.
4079 * src/raster/ftraster.c (Convert_Glyph): Don't access an
4080 uninitialized `cProfile'.
4082 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4084 [smooth] Fix uninitialized memory access.
4086 Looks like `ras.span_y' could always be used without initialization.
4087 This was never detected by valgrind before because the library-wide
4088 `raster_pool' was used for the worker object and `raster_pool' was
4089 originally zero'ed. But subsequent reuses of it were using `span_y'
4090 uninitialized. With the recent change to not use `render_pool' and
4091 allocate worker and buffer on the stack, valgrind now detects this
4092 uninitialized access.
4094 * src/smooth/ftgrays.c (gray_raster_render): Initialize
4097 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4099 [base] Don't initialize unused `driver->glyph_loader'.
4101 * src/base/ftobjs.c (Destroy_Driver): Don't call
4102 `FT_GlyphLoader_Done'.
4103 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
4105 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4107 [base] Don't allocate `library->raster_pool' anymore.
4109 It's unused after the following commits:
4111 [raster] Allocate render pool for mono rasterizer on the stack.
4112 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
4114 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
4115 serve, which is, to adjust the pool size. But the pool is now
4116 allocated on the stack on demand.
4118 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
4120 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4122 [base] Do not reorder library->renderers upon use.
4124 Instead of keeping `library->renderers' in a MRU order, just leave
4125 it as-is. The MRU machinery wasn't thread-safe.
4127 With this patch, rasterizing glyphs from different faces from
4128 different threads doesn't fail choosing rasterizer
4129 (FT_Err_Cannot_Render_Glyph).
4131 Easiest to see that crash was to add a `printf' (or otherwise let
4132 thread yield in FT_Throw with debugging enabled).
4134 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
4135 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
4137 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4139 [raster] Allocate render pool for mono rasterizer on the stack.
4141 Instead of using the `render_pool' member of `FT_Library' that is
4142 provided down to the rasterizer, completely ignore that and allocate
4143 needed objects on the stack instead.
4145 With this patch, rasterizing glyphs from different faces from
4146 different threads doesn't crash in the monochrome rasterizer.
4148 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
4149 `buffer_size', and `worker' members.
4151 (ft_black_render): Create `buffer' locally.
4152 (ft_black_reset): Updated.
4154 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4156 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
4158 It was off by default and couldn't be turned on at runtime. And the
4159 smooth rasterizer superceded it over ten years ago. No point in
4160 keeping. Comments suggested that it was there for compatibility
4165 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
4166 RASTER_GRAY_LINES): Remove macros and all associated code.
4168 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
4169 (black_TRaster): Remove `grays' and `gray_width'.
4171 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
4172 ft_black_render): Updated.
4174 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
4175 (ft_raster5_renderer_class): Removed.
4177 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4179 [smooth] Allocate render pool for smooth rasterizer on the stack.
4181 Instead of using the `render_pool' member of `FT_Library' that is
4182 provided down to the rasterizer, completely ignore that and allocate
4183 needed objects on the stack instead.
4185 With this patch, rasterizing glyphs from different faces from
4186 different threads doesn't crash in the smooth rasterizer.
4190 https://bugzilla.redhat.com/show_bug.cgi?id=678397
4191 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
4192 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
4193 https://bugs.freedesktop.org/show_bug.cgi?id=69034
4195 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
4196 `buffer_size', `band_size', and `worker' members.
4198 (gray_raster_render): Create `buffer', `buffer_size', and
4199 `band_size' locally.
4200 (gray_raster_reset): Updated.
4202 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4204 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
4206 Previously the code had stipulation for using a per-TT_Size exec
4207 context if `size->debug' was true. But there was no way that
4208 `size->debug' could *ever* be true. As such, the code was always
4209 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
4210 This was, clearly, not threadsafe.
4212 With this patch, loading glyphs from different faces from different
4213 threads doesn't crash in the bytecode loader code.
4215 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
4216 (TT_DriverRec): Remove `context' member.
4218 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
4219 `TT_ExecContext' code related to a global `TT_Driver' object.
4221 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
4222 (tt_size_done_bytecode): ... here.
4224 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
4225 (tt_size_init_bytecode): ... here, only on demand.
4227 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
4229 (TT_New_Context): Remove `TT_ExecContext' code related to a global
4232 * src/truetype/ttinterp.h: Updated.
4234 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
4236 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4238 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
4240 Stop sharing a global `AF_Loader'. Allocate one on the stack during
4243 Right now this results in about 25% slowdown, to be fixed in a
4246 With this patch loading glyphs from different faces from different
4247 threads doesn't immediately crash in the autohinting loader code.
4251 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
4253 * src/autofit/afloader.c (af_loader_init): Pass
4254 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
4255 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
4257 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
4260 * src/autofit/afmodule.c (af_autofitter_init): Don't call
4262 (af_autofitter_done): Don't call `af_loader_done'.
4263 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
4265 * src/autofit/afloader.h: Include `afmodule.h'.
4267 Move typedef for `AF_Module' to...
4269 * src/autofit/afmodule.h: ... this place.
4270 No longer include `afloader.h'.
4272 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4274 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
4276 2015-01-12 Werner Lemberg <wl@gnu.org>
4278 Fix Savannah bug #43976.
4280 Assure that FreeType's internal include directories are found before
4281 `CPPFLAGS' (which might be set by the user in the environment), and
4282 `CPPFLAGS' before `CFLAGS'.
4284 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
4285 (FT_COMPILE): Make this a special variable for compiling only the
4286 files handled in `freetype.mk'.
4287 (.c.$O): Removed, unused.
4289 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
4291 2015-01-11 Werner Lemberg <wl@gnu.org>
4293 [truetype] Prettyfing.
4295 * src/truetype/ttinterp.c (project, dualproj, fast_project,
4296 fast_dualproj): Rename to...
4297 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
4299 2015-01-11 Werner Lemberg <wl@gnu.org>
4301 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
4303 Based on a patch from Behdad.
4305 2015-01-11 Werner Lemberg <wl@gnu.org>
4307 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
4309 2015-01-11 Werner Lemberg <wl@gnu.org>
4311 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
4313 2015-01-11 Werner Lemberg <wl@gnu.org>
4315 [truetype] More macro expansions.
4317 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
4320 2015-01-11 Werner Lemberg <wl@gnu.org>
4322 [truetype] More macro expansions.
4324 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
4325 adjusting funtion calls where necessary.
4326 (FT_UNUSED_ARG): Removed, no longer needed.
4328 2015-01-10 Werner Lemberg <wl@gnu.org>
4330 [truetype] More macro expansions.
4332 Based on a patch from Behdad.
4334 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
4336 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
4337 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
4339 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
4340 (Ins_SxyTCA): New function.
4342 2015-01-10 Werner Lemberg <wl@gnu.org>
4344 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
4346 Behdad suggested this code simplification, and nobody objected...
4348 * include/config/ftoption.h, devel/ftoption.h
4349 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
4351 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
4352 Remove related code.
4353 (ARRAY_BOUND_ERROR): Use do-while loop.
4355 2015-01-10 Werner Lemberg <wl@gnu.org>
4357 [truetype] More macro expansions.
4359 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
4360 EXEC_ARG): Remove by replacing with expansion.
4362 2015-01-10 Werner Lemberg <wl@gnu.org>
4364 [truetype] More macro expansions.
4366 Based on a patch from Behdad.
4368 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
4369 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
4370 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
4371 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
4372 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
4373 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
4376 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
4377 CUR_fast_dualproj): Replace with macros `project', `dualproj',
4378 `fast_project', `fast_dualproj'.
4380 2015-01-10 Werner Lemberg <wl@gnu.org>
4382 [truetype] More macro expansions.
4384 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
4387 2015-01-10 Werner Lemberg <wl@gnu.org>
4389 [truetype] Remove code for static TrueType interpreter.
4391 This is a follow-up patch.
4393 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
4394 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
4395 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
4397 2015-01-10 Werner Lemberg <wl@gnu.org>
4399 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
4401 This starts a series of patches that simplifies the code of the
4402 bytecode interpreter.
4405 ----------------------------------------------------------------------------
4407 Copyright 2015-2016 by
4408 David Turner, Robert Wilhelm, and Werner Lemberg.
4410 This file is part of the FreeType project, and may only be used, modified,
4411 and distributed under the terms of the FreeType project license,
4412 LICENSE.TXT. By continuing to use, modify, or distribute this file you
4413 indicate that you have read the license and understand and accept it
4418 version-control: never