1 2015-11-28 Werner Lemberg <wl@gnu.org>
3 * Version 2.6.2 released.
4 =========================
7 Tag sources with `VER-2-6-2'.
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.1/2.6.2/, s/261/262/.
29 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
31 * builds/unix/configure.raw (version_info): Set to 18:2:12.
32 * CMakeLists.txt (VERSION_PATCH): Set to 2.
34 * docs/CHANGES: Updated.
36 2015-11-28 Werner Lemberg <wl@gnu.org>
40 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
42 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
44 2015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
46 Change default LCD filter to be normalized and color-balanced.
48 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
51 2015-11-28 Werner Lemberg <wl@gnu.org>
53 [docmaker] Allow references to section names.
55 In the reference, we show the section's title enclosed in single
58 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
59 section names as identifiers.
61 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
62 (section_title_header1, section_title_header2): ... these two
64 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
66 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
68 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
70 [cmake] Add script to test the config module.
72 * builds/cmake/testbuild.sh: New file.
74 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
76 * CMakeLists.txt: Create `freetype-config.cmake' config module.
78 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
80 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
82 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
84 [cmake] Add better control of library dependencies.
86 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
87 ZLIB/BZip2/PNG/HarfBuzz.
89 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
91 [cmake] Make `FindHarfbuzz' observe the REQUIRED option.
93 * builds/cmake/FindHarfBuzz.cmake: Implement it.
95 2015-11-27 Werner Lemberg <wl@gnu.org>
97 [cmake] Collect files specific to cmake in `builds/cmake'.
99 * builds/FindHarfBuzz.cmake: Move to ...
100 * builds/cmake/FindHarfBuzz.cmake: ... this place.
102 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
104 2015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
106 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
108 2015-11-26 Werner Lemberg <wl@gnu.org>
110 [docmaker] Allow `foo[bar]' as identifier.
112 We need this to handle equally named properties in different
115 * src/tools/docmaker/content.py (re_identifier),
116 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
118 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
119 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
120 HtmlFormatter::block_enter): Handle `foo[bar]'.
122 2015-11-25 Werner Lemberg <wl@gnu.org>
124 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
126 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
129 2015-11-21 Werner Lemberg <wl@gnu.org>
131 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
133 This fixes compiler warnings.
137 2015-11-20 Werner Lemberg <wl@gnu.org>
139 Add `FT_LCD_FILTER_LEGACY1' enum value.
141 This does the same as `FT_LCD_FILTER_LEGACY'.
145 https://bugs.freedesktop.org/show_bug.cgi?id=92981
149 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
150 `FT_LCD_FILTER_LEGACY1'.
152 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
154 2015-11-15 Werner Lemberg <wl@gnu.org>
156 * src/autofit/afhints.c (af_get_segment_index): Fix it.
158 The old code was too simple, returning invalid values in most cases
159 where a segment crosses the contour start.
161 2015-11-15 Werner Lemberg <wl@gnu.org>
163 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
165 2015-11-11 Werner Lemberg <wl@gnu.org>
167 [cff, autofit] Switch off stem darkening by default.
169 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
170 (cff_driver_init): Do it.
172 2015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
174 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
176 Both the native CFF hinter and the auto-hinter now have a very
177 similar rendering style.
179 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
180 longer implies FT_LOAD_FORCE_AUTOHINT.
182 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
185 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
188 * src/cff/cffdrivr.c (cff_driver_class): Use it.
190 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
193 2015-11-09 Werner Lemberg <wl@gnu.org>
195 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
197 2015-11-09 Werner Lemberg <wl@gnu.org>
199 [truetype] Remove integer to pointer conversion compiler warning.
201 Problem reported by Alexei.
203 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
204 in the glib library to fix the issue.
206 2015-11-08 Behdad Esfahbod <behdad@behdad.org>
208 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
210 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
212 2015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
214 [autofit] Don't distort (latin) glyphs too much (#46195).
216 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
219 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
220 ascender and descender data for blue zones.
221 (af_latin_metrics_scale_dim): Reject vertical scaling values that
222 change the result by more than two pixels.
224 2015-11-05 Werner Lemberg <wl@gnu.org>
226 [sfnt] Ignore embedded bitmaps with zero size (#46379).
228 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
231 2015-11-04 Werner Lemberg <wl@gnu.org>
233 [truetype] Catch infinite recursion in subglyphs (#46372).
235 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
238 * src/truetype/ttgload.c: Include FT_LIST_H.
239 (load_truetype_glyph): Add composite subglyph index to a list;
240 abort if index is already in list.
241 (tt_loader_init): Updated.
242 (tt_loader_done): New function.
243 (TT_Load_Glyph): Call `tt_loader_done'.
245 2015-11-04 Werner Lemberg <wl@gnu.org>
247 [truetype] Better tracing of composite glyphs.
249 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
250 load_truetype_glyph): Implement it.
252 2015-11-03 Werner Lemberg <wl@gnu.org>
254 [sfnt] Protect against zero-size bitmaps (#46345).
256 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
259 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
261 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
263 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
265 [autofit] Implement darkening computation function.
267 This is a crude adaption of the original `cf2_computeDarkening'
270 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
271 af_floatToFixed): New macros, taken from `cf2fixed.h'.
272 (af_loader_compute_darkening): New function.
273 * src/autofit/afloader.h: Updated.
275 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
277 [autofit] Add functions to get standard widths for writing systems.
279 We need the computed standard horizontal and vertical widths for the
280 emboldening calculation. This method provides a convenient way to
281 extract it from writing-system-specific metrics structures, which
282 all script definitions must implement.
284 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
286 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
287 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
289 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
290 (af_cjk_writing_system_class): Updated.
291 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
292 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
293 (af_indic_writing_system_class): Updated.
294 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
295 (af_indic_writing_system_class): Updated.
296 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
297 (af_indic_writing_system_class): Updated.
299 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
301 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
303 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
305 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
307 (af_face_globals_free): Reset new fields.
309 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
311 [autofit] Add stem-darkening properties.
313 Actual code follows in a later commit.
315 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
316 `darkening-parameters'.
318 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
321 * src/autofit/afmodule.c (af_property_set, af_property_get):
323 (af_autofitter_init): Initialize them.
325 2015-11-02 Bungeman <bungeman@gmail.com>
327 [ftfuzzer] Add support for multiple files (patch #8779).
329 Currently, libFuzzer only supports mutation of a single file. We
330 circumvent this problem by using an uncompressed tar archive as
331 multiple-file input for the fuzzer.
333 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
334 a constructed tarball should contain a font file as the first
335 element, and files to be attached as further elements.
337 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
338 (archive_read_entry_data, parse_data): New functions.
339 (LLVMFuzzerTestOneInput): Updated.
341 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
342 mutator for libFuzzer that can mutate tarballs in a sensible way.
344 2015-10-31 Werner Lemberg <wl@gnu.org>
346 [sfnt] Fix cmap 14 validation (#46346).
348 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
349 accessing `numRanges' and `numMappings'.
350 Fix size check for non-default UVS table.
352 2015-10-31 Werner Lemberg <wl@gnu.org>
354 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
356 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
357 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
358 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
359 argument for recursion depth.
360 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
361 Increase recursion counter for recursive call.
362 (tt_sbit_decoder_load_image): Add argument for recursion depth.
364 (tt_face_load_sbit_image): Updated.
366 2015-10-29 Werner Lemberg <wl@gnu.org>
368 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
370 2015-10-29 Werner Lemberg <wl@gnu.org>
372 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
374 Problem reported by David Capello <davidcapello@gmail.com>; see
376 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
380 2015-10-27 Werner Lemberg <wl@gnu.org>
382 [pfr] Add some safety guards (#46302).
384 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
385 (PFR_CHECK_SIZE): ... this.
386 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
388 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
389 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
390 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
391 Allocate `chars' after doing a size checks.
393 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
395 (pfr_slot_load_bitmap): ... this function.
398 2015-10-26 Werner Lemberg <wl@gnu.org>
400 [truetype] Fix sanitizing logic for `loca' (#46223).
402 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
403 incorrect adjustment of the number of glyphs, most often using far
406 2015-10-25 Werner Lemberg <wl@gnu.org>
408 [autofit] Improve tracing.
410 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
411 af_get_edge_index): New functions.
413 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
414 Add segment and edge index for each point.
415 Slightly change printing order of some elements.
416 Don't print `-1' but `--' for missing elements.
418 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
419 unnecessary `|', `[', and `]'.
420 Don't print `-1' but `--' for missing elements.
422 2015-10-24 Werner Lemberg <wl@gnu.org>
424 [sfnt] Sanitize bitmap strike glyph height.
426 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
428 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
429 for `metrics->height' by applying some heuristics.
431 2015-10-22 Werner Lemberg <wl@gnu.org>
433 [sfnt, type42] Fix clang compiler warnings.
435 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
437 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
439 2015-10-22 Dave Arnold <darnold@adobe.com>
440 Werner Lemberg <wl@gnu.org>
442 [cff] Avoid overflow/module arithmetic.
444 This modifies the addition of subroutine number to subroutine bias
445 from unsigned to signed, but does not change any results.
447 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
448 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
449 `idx' to (signed) `subrNum', since it is not an index until after
451 * src/cff/cf2ft.h: Updated.
453 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
456 2015-10-22 Werner Lemberg <wl@gnu.org>
458 [cid] Better check of `SubrCount' dictionary entry (#46272).
460 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
461 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
463 2015-10-21 Werner Lemberg <wl@gnu.org>
465 [base] Pacify compiler (#46266).
467 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
470 2015-10-21 Werner Lemberg <wl@gnu.org>
472 [type42] Fix heap buffer overflow (#46269).
474 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
477 2015-10-21 Dave Arnold <darnold@adobe.com>
479 [cff] Fix limit in assert for max hints.
481 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
484 2015-10-21 Dave Arnold <darnold@adobe.com>
486 [cff] Remove an assert (#46107).
488 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
491 2015-10-21 Werner Lemberg <wl@gnu.org>
493 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
495 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
496 only after thorough checks.
497 Add tracing messages.
499 2015-10-21 Werner Lemberg <wl@gnu.org>
501 [type42] Better check invalid `sfnts' array data (#46255).
503 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
504 checked individually against available data size.
506 2015-10-20 Werner Lemberg <wl@gnu.org>
508 [cid] Add a bunch of safety checks.
510 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
512 (cid_read_subrs): Check largest offset against stream size.
513 (cid_parse_dict): Move safety check to ...
514 (cid_face_open): ... this function.
515 Also test length of binary data and values of `SDBytes',
516 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
518 2015-10-20 Werner Lemberg <wl@gnu.org>
520 [cid] Avoid segfault with malformed input (#46250).
522 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
525 2015-10-20 StudioEtrange <nomorgan@gmail.com>
527 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
529 2015-10-20 Werner Lemberg <wl@gnu.org>
531 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
533 2015-10-19 Bungeman <bungeman@gmail.com>
535 [cid] Better handle invalid glyph stream offsets (#46221).
537 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
540 2015-10-18 Werner Lemberg <wl@gnu.org>
542 [psaux] Fix tracing of negative numbers.
544 Due to incorrect casting negative numbers were shown as very large
545 (positive) integers on 64bit systems.
547 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
548 Use division instead of shift.
550 2015-10-18 Werner Lemberg <wl@gnu.org>
552 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
554 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
555 with #ifndef ... #endif, as suggested in the tracker issue.
557 2015-10-18 Werner Lemberg <wl@gnu.org>
559 [truetype] Better protection against malformed `fpgm' (#46223).
561 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
562 malformed `fpgm' table more than once.
564 2015-10-17 Werner Lemberg <wl@gnu.org>
566 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
568 Reported by Kostya Serebryany <kcc@google.com>.
570 2015-10-17 Werner Lemberg <wl@gnu.org>
572 [bdf] Prevent memory leak (#46217).
574 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
577 2015-10-17 Werner Lemberg <wl@gnu.org>
579 [bdf] Use stream size to adjust number of glyphs.
581 * src/bdf/bdflib.c (ACMSG17): New message macro.
582 (_bdf_parse_t): Add member `size'.
583 (bdf_load_font): Set `size'.
584 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
586 2015-10-17 Werner Lemberg <wl@gnu.org>
588 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
590 2015-10-17 Werner Lemberg <wl@gnu.org>
592 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
594 2015-10-17 Werner Lemberg <wl@gnu.org>
596 [psaux] Fix heap buffer overflow (#46221).
598 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
601 2015-10-17 Werner Lemberg <wl@gnu.org>
603 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
605 2015-10-15 Kostya Serebryany <kcc@google.com>
607 [ftfuzzer] Add README.
609 * src/tools/ftfuzzer/README: New file.
611 2015-10-15 Bungeman <bungeman@gmail.com>
613 [bdf] Fix memory leak (#46213).
615 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
618 2015-10-15 Werner Lemberg <wl@gnu.org>
620 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
622 * devel/ftoption.h, include/freetype/config/ftoption.h
623 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
625 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
626 (TT_RunIns): Updated.
628 2015-10-15 Werner Lemberg <wl@gnu.org>
630 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
632 The used indices were off by 1.
634 2015-10-15 Bungeman <bungeman@gmail.com>
635 Werner Lemberg <wl@gnu.org>
637 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
639 2015-10-15 Werner Lemberg <wl@gnu.org>
641 [base] Compute MD5 checksums only if explicitly requested.
643 This improves profiling accuracy.
645 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
647 2015-10-14 Werner Lemberg <wl@gnu.org>
649 [base] Use `FT_' namespace for MD5 functions (#42366).
651 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
652 Undefine HAVE_OPENSSL.
654 2015-10-13 Werner Lemberg <wl@gnu.org>
656 [type1] Correctly handle missing MM axis names (#46202).
658 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
660 2015-10-13 Werner Lemberg <wl@gnu.org>
662 [pcf] Quickly exit if font index < 0.
664 Similar to other font formats, this commit makes the parser no
665 longer check the whole PCF file but only the header and the TOC if
666 we just want to get the number of available faces (and a proper
667 recognition of the font format).
669 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
670 Exit quickly if face_index < 0.
672 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
673 Exit quickly if face_index < 0.
675 * src/pcf/pcf.h: Updated.
677 2015-10-13 Werner Lemberg <wl@gnu.org>
679 [ftfuzzer] Handle TTCs and MM/GX variations.
681 This patch also contains various other improvements.
683 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
685 (FT_Global): New class. Use it to provide a global constructor and
686 destructor for the `FT_Library' object.
687 (setIntermediateAxis): New function to select an (arbitrary)
689 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
690 Also call `FT_Set_Char_Size'.
692 2015-10-13 Werner Lemberg <wl@gnu.org>
694 [truetype] Refine some GX sanity tests.
696 Use the `gvar' table size instead of the remaining bytes in the
699 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
701 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
702 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
704 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
706 2015-10-13 Werner Lemberg <wl@gnu.org>
708 [truetype] Another GX sanity test.
710 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
714 2015-10-13 Werner Lemberg <wl@gnu.org>
716 [truetype] Fix memory leak for broken GX fonts (#46188).
718 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
721 2015-10-13 Werner Lemberg <wl@gnu.org>
723 [truetype] Fix commit from 2015-10-10.
725 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
726 handling body to condition.
728 2015-10-12 Werner Lemberg <wl@gnu.org>
730 [unix] Make MKDIR_P actually work.
732 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
735 Problem reported by Dan Liddell <lddll@yahoo.com>.
737 2015-10-11 Werner Lemberg <wl@gnu.org>
739 [sfnt] Improve extraction of number of named instances.
741 * src/sfnt/sfobjs.c (sfnt_init_face)
742 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
745 2015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
747 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
750 2015-10-10 Werner Lemberg <wl@gnu.org>
752 [sfnt] Fix infinite loops with broken cmaps (#46167).
754 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
755 of border conditions (i.e., if the loops exit naturally).
757 2015-10-10 Werner Lemberg <wl@gnu.org>
759 [truetype] More sanity tests for GX handling.
761 These tests should mainly help avoid unnecessarily large memory
762 allocations in case of malformed fonts.
764 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
765 ft_var_readpackeddeltas): Check number of points against stream
767 (ft_var_load_avar): Check `pairCount' against table length.
768 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
769 against table length.
770 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
772 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
773 Free `sharedpoints' to avoid memory leak.
775 2015-10-10 Werner Lemberg <wl@gnu.org>
777 [truetype] Better protection against malformed GX data (#46166).
779 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
780 handle empty `localpoints' array.
782 2015-10-10 Werner Lemberg <wl@gnu.org>
784 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
786 2015-10-09 Werner Lemberg <wl@gnu.org>
788 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
790 2015-10-08 Werner Lemberg <wl@gnu.org>
792 [pcf] Protect against invalid number of TOC entries (#46159).
794 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
795 against size of data stream.
797 2015-10-08 Werner Lemberg <wl@gnu.org>
799 [type42] Protect against invalid number of glyphs (#46159).
801 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
802 `CharStrings' dictionary entries against size of data stream.
804 2015-10-08 Werner Lemberg <wl@gnu.org>
806 [sfnt] Fix some signed overflows (#46149).
808 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
809 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
811 2015-10-08 Werner Lemberg <wl@gnu.org>
813 [type1] Protect against invalid number of subroutines (#46150).
815 * src/type1/t1load.c (parse_subrs): Check number of
816 `Subrs' dictionary entries against size of data stream.
818 2015-10-07 Kostya Serebryany <kcc@google.com>
820 [ftfuzzer] Add support for LLVM's LibFuzzer.
822 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
824 2015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
826 [smooth] Faster alternative line renderer.
828 This implementation renders the entire line segment at once without
829 subdividing it into scanlines. The main speed improvement comes from
830 reducing the number of divisions to just two per line segment, which
831 is a bare minimum to calculate cell coverage in a smooth rasterizer.
832 Notably, the progression from cell to cell does not itself require any
833 divisions at all. The speed improvement is more noticeable at larger
836 * src/smooth/ftgrays.c (gray_render_line): New implementation.
838 2015-10-06 Werner Lemberg <wl@gnu.org>
840 [cff] Return correct PS names from pure CFF (#46130).
842 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
845 2015-10-04 Werner Lemberg <wl@gnu.org>
847 [base] Replace left shifts with multiplication (#46118).
849 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
851 2015-10-04 Werner Lemberg <wl@gnu.org>
853 * Version 2.6.1 released.
854 =========================
857 Tag sources with `VER-2-6-1'.
859 * docs/VERSION.DLL: Update documentation and bump version number to
862 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
863 builds/windows/vc2005/index.html,
864 builds/windows/vc2008/freetype.vcproj,
865 builds/windows/vc2008/index.html,
866 builds/windows/vc2010/freetype.vcxproj,
867 builds/windows/vc2010/index.html,
868 builds/windows/visualc/freetype.dsp,
869 builds/windows/visualc/freetype.vcproj,
870 builds/windows/visualc/index.html,
871 builds/windows/visualce/freetype.dsp,
872 builds/windows/visualce/freetype.vcproj,
873 builds/windows/visualce/index.html,
874 builds/wince/vc2005-ce/freetype.vcproj,
875 builds/wince/vc2005-ce/index.html,
876 builds/wince/vc2008-ce/freetype.vcproj,
877 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
879 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
881 * builds/unix/configure.raw (version_info): Set to 18:1:12.
882 * CMakeLists.txt (VERSION_PATCH): Set to 1.
884 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
887 2015-10-04 Werner Lemberg <wl@gnu.org>
889 [bzip2, gzip] Avoid access of unitialized memory (#46109).
891 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
892 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
893 avoid copying uninitialized memory.
895 2015-10-03 Werner Lemberg <wl@gnu.org>
897 [bzip2, gzip] Avoid access of unitialized memory (#46109).
899 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
900 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
901 avoid copying uninitialized memory.
903 2015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
905 [smooth] Clean up worker.
907 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
909 2015-10-01 Werner Lemberg <wl@gnu.org>
911 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
913 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
914 border conditions (i.e., if the loop exits naturally).
916 2015-10-01 Werner Lemberg <wl@gnu.org>
918 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
919 They should be a subset of `af_deva_uniranges'.
921 2015-10-01 Werner Lemberg <wl@gnu.org>
923 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
925 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
926 reject too large glyph indices.
928 2015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
930 [smooth] Clean up worker.
932 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
933 (gray_start_cell, gray_render_line): Update.
935 2015-09-30 Werner Lemberg <wl@gnu.org>
937 [autofit] Replace `no-base' with `non-base'.
939 * src/autofit/*: Do it.
941 2015-09-30 Werner Lemberg <wl@gnu.org>
943 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
945 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
946 skip invalid segments.
947 If searching the next character, provide a more efficient logic to
950 2015-09-30 Werner Lemberg <wl@gnu.org>
952 [truetype] Adjust number of glyphs for malformed `loca' tables.
954 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
956 2015-09-29 Werner Lemberg <wl@gnu.org>
958 [pshinter] Avoid harmless overflow (#45984).
960 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
962 2015-09-28 Werner Lemberg <wl@gnu.org>
964 [autofit] Add support for Lao script.
966 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
969 * src/autofit/afblue.dat: Add blue zone data for Lao.
971 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
973 * src/autofit/afscript.h: Add Lao standard characters.
975 * src/autofit/afranges.c: Add Lao data.
977 * src/autofit/afstyles.h: Add Lao data.
979 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
981 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
983 open_face_from_buffer() frees passed buffer if valid font
984 is not found. But if copying to the buffer is failed,
985 the allocated buffer should be freed within the caller.
987 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
988 the buffer `sfnt_ps' if an error caused before calling
989 open_face_from_buffer().
990 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
991 an error caused before calling open_face_from_buffer();
993 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
995 [mac] Fix buffer size calculation for LWFN font.
997 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
998 to prevent confused copy by too large chunk size.
1000 2015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
1002 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
1004 2015-09-26 Werner Lemberg <wl@gnu.org>
1006 [autofit] Minor tracing improvement.
1008 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
1009 blue zones header line if there are no blue zones.
1011 2015-09-26 Werner Lemberg <wl@gnu.org>
1013 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
1015 Suggested by Hin-Tak Leung.
1017 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
1018 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
1020 2015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
1022 Add new FT_LOAD_COMPUTE_METRICS load flag.
1024 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
1025 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
1027 2015-09-26 Werner Lemberg <wl@gnu.org>
1029 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
1031 2015-09-25 Werner Lemberg <wl@gnu.org>
1033 [type1] Protect against invalid number of glyphs (#46029).
1035 * src/type1/t1load.c (parse_charstrings): Check number of
1036 `CharStrings' dictionary entries against size of data stream.
1038 2015-09-23 Werner Lemberg <wl@gnu.org>
1040 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
1042 While the current code in `FT_Get_Next_Char' correctly rejects
1043 out-of-bounds glyph indices, it can be extremely slow for malformed
1044 cmaps that use 32bit values. This commit tries to improve that.
1046 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
1047 tt_cmap12_char_map_binary, tt_cmap13_next,
1048 tt_cmap13_char_map_binary): Reject glyph indices larger than or
1049 equal to the number of glyphs.
1051 2015-09-23 Werner Lemberg <wl@gnu.org>
1053 [base, sfnt] Better checks for invalid cmaps (1/2).
1055 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
1057 (FT_Get_First_Char): Updated.
1059 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
1060 codes greater than 0xFFFF.
1062 (tt_cmap8_char_index): Avoid integer overflow in computation of
1064 (tt_cmap8_char_next): Avoid integer overflows in computation of
1065 both next character code and glyph index.
1067 (tt_cmap10_char_index): Fix unsigned integer logic.
1068 (tt_cmap10_char_next): Avoid integer overflow in computation of
1069 next character code.
1071 (tt_cmap12_next): Avoid integer overflows in computation of both
1072 next character code and glyph index.
1073 (tt_cmap12_char_map_binary): Ditto.
1074 (tt_cmap12_char_next): Simplify.
1076 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
1077 of next character code.
1078 (tt_cmap13_char_next): Simplify.
1080 2015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1082 [base] Check too long POST and sfnt resource (#45919).
1084 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
1085 resource fork for Mac OS. Resource forks larger than 16 MB can be
1086 written but can't be handled correctly, at least in Carbon routine.
1087 See https://support.microsoft.com/en-us/kb/130437.
1089 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
1090 prefix for `%p' formatter.
1092 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
1093 total size of the concatenated POST resource before buffer
1095 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
1096 before buffer allocation.
1098 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
1099 total resource size before buffer allocation.
1101 2015-09-19 Werner Lemberg <wl@gnu.org>
1103 [sfnt] Improve handling of invalid SFNT table entries (#45987).
1105 This patch fixes weaknesses in function `tt_face_load_font_dir'.
1107 - It incorrectly assumed that valid tables are always at the
1108 beginning. As a consequence, some valid tables after invalid
1109 entries (which are ignored) were never seen.
1111 - Duplicate table entries (this is, having the same tag) were not
1114 - The number of valid tables was sometimes too large, leading to
1115 access of invalid tables.
1117 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
1119 Add another tracing message.
1120 (tt_face_load_font_dir): Only allocate table array for valid
1121 entries as returned by `check_table_dir'.
1122 Reject duplicate tables and adjust number of valid tables
1125 2015-09-19 Werner Lemberg <wl@gnu.org>
1127 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
1129 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
1130 then take the absolute value.
1131 Also apply FT_ABS to `height'.
1133 2015-09-17 Werner Lemberg <wl@gnu.org>
1135 [type42] Fix memory leak (#45989).
1137 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
1138 `CharStrings' array.
1140 2015-09-17 Werner Lemberg <wl@gnu.org>
1142 [psaux] Fix memory leak (#45986).
1144 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1145 Free `temp' in case of error.
1147 2015-09-17 Werner Lemberg <wl@gnu.org>
1149 [psaux] Improve tracing message.
1151 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1152 Handle plural correctly.
1154 2015-09-17 Werner Lemberg <wl@gnu.org>
1156 [pcf] Fix integer overflows (#45985).
1158 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
1160 2015-09-17 Werner Lemberg <wl@gnu.org>
1162 [pcf] Use FT_ABS for some property values (#45893).
1164 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
1165 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
1166 RESOLUTION_Y. In tracing mode, add warnings.
1168 2015-09-16 Werner Lemberg <wl@gnu.org>
1170 Minor fixes for some clang warnings.
1172 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
1175 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
1177 2015-09-15 Werner Lemberg <wl@gnu.org>
1179 [type1, type42] Fix memory leaks (#45966).
1181 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
1183 (parse_blend_design_map): Allow only a single design map.
1184 (parse_encoding): Handle multiple encoding vectors.
1186 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
1189 2015-09-15 Werner Lemberg <wl@gnu.org>
1191 [truetype] Fix integer type (#45965).
1193 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
1195 2015-09-15 Werner Lemberg <wl@gnu.org>
1197 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
1199 2015-09-15 Werner Lemberg <wl@gnu.org>
1201 [type1, type42] Check encoding array size (#45961).
1203 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
1204 (t42_parse_encoding): Do it.
1206 2015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1208 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
1210 2015-09-14 Werner Lemberg <wl@gnu.org>
1212 [type1] Fix another potential buffer overflow (#45955).
1214 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
1215 `eexec' doesn't exceed `limit'.
1217 2015-09-13 Werner Lemberg <wl@gnu.org>
1219 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
1221 * builds/unix/mkinstalldirs: Removed, no longer needed.
1223 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
1224 Update pwd call for `$INSTALL'.
1226 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
1228 * autogen.sh: Updated.
1230 2015-09-13 Werner Lemberg <wl@gnu.org>
1232 [winfonts] Check alignment shift count for resource data (#45938).
1234 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
1236 2015-09-13 Werner Lemberg <wl@gnu.org>
1238 [type1] Fix potential buffer overflow (#45923).
1240 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
1241 point to end of file buffer.
1243 2015-09-13 Werner Lemberg <wl@gnu.org>
1245 [gzip] Fix access of small compressed files (#45937).
1247 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
1249 (ft_gzip_get_uncompressed_file): Correct byte order while reading
1250 unsigned long value. Without this change, the whole optimization of
1251 accessing small files in `FT_Stream_OpenGzip' is never executed! As
1252 a consequence, access to PCF files in general (which are normally
1253 small files) should be much improved now as originally intended.
1255 2015-09-11 Werner Lemberg <wl@gnu.org>
1257 [psaux] Fix potential buffer overflow (#45922).
1259 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
1260 enclosed in balanced expressions, ensure that the cursor position
1261 doesn't get larger than the current limit.
1263 2015-09-11 Werner Lemberg <wl@gnu.org>
1265 [base] Avoid crash while tracing `load_mac_face'.
1267 Reported in Savannah bug #45919.
1269 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
1272 2015-09-11 Werner Lemberg <wl@gnu.org>
1274 [type42] Fix endless loop (#45920).
1276 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
1277 type1's `parse_encoding'.
1279 2015-09-10 Werner Lemberg <wl@gnu.org>
1281 [docmaker] Allow `-' in bold and italic markup.
1283 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
1286 2015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
1288 * src/base/ftcalc.c (FT_RoundFix): Improve.
1290 2015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
1292 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
1294 This commit makes the functions behave as expected, this is,
1295 rounding towards plus or minus infinity.
1297 2015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
1299 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
1301 2015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
1303 [raster,smooth] Microoptimizations.
1305 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
1306 Beziier_Up, ): Use do-while loops.
1308 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
1309 gray_convert_glyph): Ditto.
1311 2015-09-04 Werner Lemberg <wl@gnu.org>
1313 [autofit] Redesign code ranges (2/2).
1315 This commit adds two fallback scripts (`latb', `latp') and
1316 implements support for the no-base character ranges introduced in
1317 the previous commit.
1319 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
1320 `script_uni_nobase_ranges' field.
1321 (AF_DEFINE_SCRIPT_CLASS): Updated.
1323 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
1324 `latp' fallback scripts.
1326 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
1327 superscript fallback scripts.
1329 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1331 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
1333 (AF_STYLE_MASK): Updated.
1335 * src/autofit/afglobal.c (SCRIPT): Updated.
1336 (af_face_globals_compute_style_coverage): Handle new style flag.
1338 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
1341 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
1343 2015-09-04 Werner Lemberg <wl@gnu.org>
1345 [autofit] Redesign code ranges (1/2).
1347 This patch introduces auxiliary code ranges that identify no-base
1348 characters; they refer to glyphs of a script that should be hinted
1349 without alignments to blue zones (mostly diacritics).
1351 It also splits off ranges for fallback scripts that handle subscript
1352 and superscript characters not covered by OpenType features. For
1353 example, this greatly helps improve the hinting of various phonetic
1354 alphabets, which contain a large amount characters that look like
1357 Finally, code ranges are updated to Unicode 8.0, and enclosed
1358 characters are removed in general since they normally look better if
1361 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
1363 Split off superscript-like and subscript-like glyphs into...
1365 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
1367 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
1368 of the corresponding character ranges.
1370 2015-09-03 Werner Lemberg <wl@gnu.org>
1372 [autofit] Pass glyph index to hinting function.
1374 No functionality change yet.
1376 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
1379 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
1380 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
1381 (af_indic_hints_apply), src/autofit/aflatin.c
1382 (af_latin_hints_apply), src/autofit/aflatin2.c
1383 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
1386 2015-08-30 Werner Lemberg <wl@gnu.org>
1388 [autofit] Code clean-up.
1390 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
1391 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
1393 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1396 2015-08-30 Werner Lemberg <wl@gnu.org>
1398 [autofit] Make glyph style array use 16bit values.
1400 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
1401 `FT_UShort' for `map' field.
1403 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
1404 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
1405 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
1407 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
1409 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
1411 2015-08-26 Werner Lemberg <wl@gnu.org>
1413 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
1415 2015-08-25 Werner Lemberg <wl@gnu.org>
1417 [base] Improve kerning tracing and documentation.
1419 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
1420 scaled-down kerning values differ.
1422 2015-08-18 Werner Lemberg <wl@gnu.org>
1424 [raster] Remove last remnants of `raster5' driver.
1426 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
1428 * src/raster/rastpic.c, src/raster/rastpic.h
1429 (ft_raster5_renderer_class_pic_init,
1430 ft_raster5_renderer_class_pic_free): Removed.
1432 2015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1434 [base] Improve emboldener (#45596).
1436 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
1437 of zero-lenght segments.
1439 2015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1441 [base] Reoptimize arithmetic.
1443 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
1444 special cases that slow down the general use.
1446 2015-08-15 pazer <ibemad@gmail.com>
1448 Fix C++ compilation (#45762).
1450 * src/base/ftstroke.c (ft_outline_glyph_class): Use
1453 2015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1455 [truetype] Clean up.
1457 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
1458 `FT_Outline_Transform' and `FT_Outline_Translate'.
1459 (translate_array): Dropped.
1461 2015-08-14 Andreas Enge <andreas.enge@inria.fr>
1463 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
1465 2015-08-13 Werner Lemberg <wl@gnu.org>
1467 [truetype] Introduce named instance access to GX fonts.
1469 For functions querying a face, bits 16-30 of the face index can hold
1470 the named instance index if we have a GX font. The indices start
1471 with value 1; value 0 indicates font access without GX variation
1474 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
1475 * include/freetype/internal/sfnt.h: Ditto.
1477 * src/sfnt/sfobjs.c (sfnt_init_face)
1478 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
1480 (sfnt_load_face): Updated.
1482 * src/truetype/ttobjs.c (tt_face_init)
1483 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
1486 * src/base/ftobjs.c (open_face_from_buffer,
1487 open_face_PS_from_sfnt_stream): Updated.
1488 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
1489 * src/cff/cffload.c (cff_font_load): Updated.
1491 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
1492 pure CFF fonts if `font_index < 0'.
1495 * src/cid/cidobjs.c (cid_face_init): Updated.
1496 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
1497 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
1498 * src/type1/t1objs.c (T1_Face_Init): Updated.
1499 * src/type42/t42objs.c (T42_Face_Init): Updated.
1500 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
1503 * docs/CHANGES: Updated.
1505 2015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1507 [type1,cff,cid] Streamline font matrix application.
1509 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
1510 if font matrix is not trivial.
1511 * src/cff/cffgload.c (cff_slot_load): Ditto.
1512 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
1515 2015-08-11 Werner Lemberg <wl@gnu.org>
1517 [builds/unix] Minor.
1519 * builds/unix/configure.raw:
1520 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
1521 similarly named uppercase variables.
1523 2015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1525 [type1,cid,type42] Minor improvements.
1527 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
1528 when necessary. Refresh comments.
1529 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
1530 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
1532 2015-08-08 Werner Lemberg <wl@gnu.org>
1534 [type42] Fix glyph access.
1536 This is a severe bug: We've missed one level of indirection, as
1537 described in the Type 42 specification. As a result, ftview
1538 sometimes showed incorrect glyphs for given glyph names, and even
1539 displayed `error 0x0006' (invalid argument!) in case the number of
1540 glyph indices differed between the Type 42 font and the embedded
1543 Apparently, noone ever noticed it; this shows how much Type 42 fonts
1546 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
1547 to embedded TTF's glyph index.
1549 2015-08-08 Werner Lemberg <wl@gnu.org>
1551 [type42] Minor clean-up.
1553 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
1556 2015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1558 [type42] Parse FontMatrix according to specifications.
1560 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
1561 does not need scaling by 1000. Units_per_EM are taken from the
1564 2015-08-06 Werner Lemberg <wl@gnu.org>
1566 [autofit] Improve Arabic hinting.
1568 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
1571 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
1574 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1576 2015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1578 [truetype] Clean up types.
1580 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
1581 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
1582 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
1583 * src/truetype/ttgload.c: Remove corresponding type casts.
1584 * src/truetype/ttsubpix.c: Ditto.
1586 2015-08-05 Werner Lemberg <wl@gnu.org>
1588 [autofit] Improve recognition of flat vs. rounded segments.
1590 Lower the flatness threshold from upem/8 to upem/14, making the
1591 auto-hinter accept shorter elements.
1593 Synchronize flat/round stem selection algorithm with blue zone code.
1595 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
1596 (af_latin_metrics_init_blues): Use it.
1597 (af_latin_hints_compute_segments): Collect information on maximum
1598 and minimum coordinates of `on' points; use this to add a constraint
1599 for the flat/round decision similar to
1600 `af_latin_metrics_init_blues'.
1602 2015-08-04 Werner Lemberg <wl@gnu.org>
1604 Another left-shift bug (#45681).
1606 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
1609 2015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1611 [base] Fix `ft_corner_orientation'.
1613 Remove casting from `FT_Long' to `FT_Int' that might change the sign
1614 of the return value and make it faster too.
1616 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
1617 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
1618 * src/pshinter/pshalgo.c: Remove old unused code.
1620 2015-08-03 Werner Lemberg <wl@gnu.org>
1622 * src/truetype/ttgload.c (load_truetype_glyph)
1623 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
1624 having a depth greater than 1.
1626 2015-08-03 Werner Lemberg <wl@gnu.org>
1628 Fix typo in clang bug from 2015-07-31 (#45678).
1630 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
1632 2015-08-02 Werner Lemberg <wl@gnu.org>
1634 * CMakeLists.txt: Improve shared library support.
1636 Based on a patch from John Cary <cary@txcorp.com>.
1638 2015-08-02 Werner Lemberg <wl@gnu.org>
1640 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
1642 2015-08-02 Werner Lemberg <wl@gnu.org>
1644 Fix more invalid left-shifts.
1646 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
1649 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1650 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
1653 2015-07-31 Werner Lemberg <wl@gnu.org>
1655 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
1657 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
1658 positive values from header.
1661 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
1664 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
1665 _bdf_clear_glyph_modified): Use unsigned long constant.
1667 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
1668 left-shift values that can be negative.
1670 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
1671 left-shift values that can be negative.
1673 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
1676 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
1677 values that can be negative.
1679 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
1680 compute_glyph_metrics, load_sbit_image): Don't left-shift values
1681 that can be negative.
1683 2015-07-31 Werner Lemberg <wl@gnu.org>
1687 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
1688 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
1690 2015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
1692 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
1694 2015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1696 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
1698 2015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
1700 [cff] Don't use `hmtx' table for LSB (#45520).
1702 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
1703 width only. Bug introduced 2015-04-10.
1705 2015-07-09 Werner Lemberg <wl@gnu.org>
1707 Better support of user-supplied C++ namespaces.
1711 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
1715 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
1716 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
1717 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
1718 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
1719 header files that contain FT_{BEGIN,END}_HEADER macros by
1722 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
1723 FT_CONFIG_STANDARD_LIBRARY_H earlier.
1725 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
1727 2015-07-07 Werner Lemberg <wl@gnu.org>
1729 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
1731 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
1733 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
1735 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
1737 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
1738 * src/sfnt/sfobjs.h: Add prototype for it.
1740 2015-06-30 Werner Lemberg <wl@gnu.org>
1742 Fix some clang compiler warnings.
1744 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
1745 (cf2_interpT2CharString), src/truetype/ttgload.c
1746 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
1747 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
1749 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1751 [truetype] Speed up bytecode interpreter.
1753 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
1755 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1757 [base] Speed up emboldening.
1759 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
1760 `FT_Vector_NormLen'.
1762 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1764 [base] Implement fast vector normalization.
1766 The function uses Newton's iterations instead of dividing vector
1767 components by its length, which needs a square root. This is,
1768 literally, a bit less accurate but a lot faster.
1770 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
1772 2015-06-28 Werner Lemberg <wl@gnu.org>
1774 * CMakeLists.txt: Always create `ftconfig.h'.
1776 For non-UNIX builds, the file stays unmodified. However, it's
1777 better to have the main configuration files at the same place
1778 regardless of the OS.
1780 2015-06-28 Werner Lemberg <wl@gnu.org>
1782 * CMakeLists.txt: Improve MSVC support (#43737).
1784 2015-06-28 Werner Lemberg <wl@gnu.org>
1786 [cmake] Check for libraries and create `ftoption.h'.
1788 * builds/FindHarfBuzz.cmake: New file, taken from
1790 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
1792 * CMakeLists.Txt: Add path to local cmake modules.
1793 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
1794 Create `ftoption.h' file.
1795 Set up include and linker stuff for libraries.
1797 2015-06-28 Werner Lemberg <wl@gnu.org>
1799 * CMakeLists.txt: Fix creation of `ftconfig.h'.
1800 Check for UNIX header files using `check_include_file'.
1801 Set up correct header include directories.
1803 2015-06-28 Werner Lemberg <wl@gnu.org>
1805 * CMakeLists.txt: Disallow in-source builds.
1807 2015-06-27 Werner Lemberg <wl@gnu.org>
1809 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
1811 2015-06-26 Werner Lemberg <wl@gnu.org>
1813 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
1815 2015-06-25 Werner Lemberg <wl@gnu.org>
1817 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
1818 Additionally, do this for UNIX only.
1820 2015-06-25 Werner Lemberg <wl@gnu.org>
1822 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
1824 2015-06-25 Werner Lemberg <wl@gnu.org>
1826 Another adjustment to header locations.
1828 This change is a result of a discussion thread on freetype-devel
1830 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
1832 Re-introduce the `freetype2' subdirectory for all FreeType header
1833 files after installation, and rename the `freetype2' subdirectory in
1834 the git repository to `freetype'.
1836 * include/freetype2: Renamed to...
1837 * include/freetype: This.
1839 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1840 PRIVATE_HEADERS): Updated.
1841 Update creation of `ftconfig.h'.
1842 Install generated `ftconfig.h'.
1844 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1846 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1847 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1848 builds/unix/freetype2.in: Updated.
1850 * builds/unix/freetype-config.in: Updated.
1851 * builds/unix/configure.raw: Don't check for `rmdir'.
1852 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
1853 according to the autoconf info manual.
1854 * builds/unix/install.mk (install, uninstall,
1855 distclean_project_unix): Update and simplify.
1857 * builds/wince/*, builds/windows/*: Updated.
1859 * devel/ft2build.h, include/ft2build.h: Updated.
1861 * include/freetype2/config/ftheader.h,
1862 include/freetype2/internal/ftserv.h,
1863 include/freetype2/internal/internal.h: Update all header file
1866 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1870 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1872 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
1874 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1876 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
1878 2015-06-23 Werner Lemberg <wl@gnu.org>
1880 s/TYPEOF/FT_TYPEOF/ (#45376).
1882 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
1883 include/freetype2/config/ftconfig.h,
1884 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
1886 2015-06-22 Werner Lemberg <wl@gnu.org>
1888 Fix Savannah bug #45097.
1890 We no longer `pollute' the namespace of possible header file names;
1891 instead we move `ft2build.h' up by one level so that it gets
1892 installed in the default include directory (e.g.,
1893 /usr/local/include). After this commit, only `ft2build.h' stays in
1894 the compiler's include path.
1896 No visible changes for the user who follows the standard FreeType
1897 header inclusion rules.
1899 * include/*: Move to ...
1900 * include/freetype2/*: This directory, except `ft2build.h'.
1902 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1903 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1905 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1906 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1907 builds/unix/install.mk (install, uninstall),
1908 builds/unix/freetype2.in: Updated.
1910 * builds/unix/freetype-config.in: Updated.
1911 Emit -I directory only if it is not `/usr/include'.
1913 * builds/wince/*, builds/windows/*: Updated.
1915 * devel/ft2build.h, include/ft2build.h: Updated.
1917 * include/freetype2/config/ftheader.h,
1918 include/freetype2/internal/ftserv.h,
1919 include/freetype2/internal/internal.h: Update all header file
1922 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1924 2015-06-21 Werner Lemberg <wl@gnu.org>
1926 Make Jam support work again.
1928 This is just very basic stuff and just a little bit tested on
1929 GNU/Linux only. I won't delve into this since I'm not a Jam user.
1931 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
1932 (DEFINES): Replace with...
1933 (CCFLAGS): ... this.
1935 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
1936 already handled in the top-level Jamfile.
1938 * src/autofit/Jamfile (DEFINES): Replace with...
1939 (CCFLAGS): ... this.
1940 (_sources): Add missing files.
1942 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
1943 longer contains macro header definitions.
1945 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
1946 src/truetype/Jamfile (_sources): Add missing files.
1948 2015-06-16 Werner Lemberg <wl@gnu.org>
1950 Fix Savannah bug #45326.
1952 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
1955 2015-06-07 Werner Lemberg <wl@gnu.org>
1957 * Version 2.6 released.
1958 =======================
1961 Tag sources with `VER-2-6'.
1963 * docs/VERSION.DLL: Update documentation and bump version number to
1966 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1967 builds/windows/vc2005/index.html,
1968 builds/windows/vc2008/freetype.vcproj,
1969 builds/windows/vc2008/index.html,
1970 builds/windows/vc2010/freetype.vcxproj,
1971 builds/windows/vc2010/index.html,
1972 builds/windows/visualc/freetype.dsp,
1973 builds/windows/visualc/freetype.vcproj,
1974 builds/windows/visualc/index.html,
1975 builds/windows/visualce/freetype.dsp,
1976 builds/windows/visualce/freetype.vcproj,
1977 builds/windows/visualce/index.html,
1978 builds/wince/vc2005-ce/freetype.vcproj,
1979 builds/wince/vc2005-ce/index.html,
1980 builds/wince/vc2008-ce/freetype.vcproj,
1981 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
1983 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
1984 (FREETYPE_PATCH): Set to 0.
1986 * builds/unix/configure.raw (version_info): Set to 18:0:12.
1987 * CMakeLists.txt (VERSION_MINOR): Set to 6.
1988 (VERSION_PATCH): Set to 0.
1990 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
1991 declarations for dumping functions.
1993 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
1995 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
1997 Don't include a zero patch level in version string.
1998 * builds/freetype.mk: Remove code for computing the version string.
2000 2015-06-06 Ashish Azad <ashish.azad@samsung.com>
2002 Fix Savannah bug #45260.
2004 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
2006 2015-06-03 Werner Lemberg <wl@gnu.org>
2008 [truetype] Fix memory leak.
2010 Problem reported by Grissiom <chaos.proton@gmail.com>; in
2012 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
2014 there is an example code to trigger the bug.
2016 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
2017 data before allocating again. Bug most probably introduced four
2018 years ago in version 2.4.3.
2020 2015-06-02 Werner Lemberg <wl@gnu.org>
2022 [raster] Add more tracing.
2024 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
2025 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
2026 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
2028 2015-06-01 Werner Lemberg <wl@gnu.org>
2030 [truetype] While tracing opcodes, show code position and stack.
2032 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
2034 (opcode_name): Add string lengths.
2035 (TT_RunIns): Implement display of code position and stack.
2037 2015-05-31 Werner Lemberg <wl@gnu.org>
2039 [truetype] In GX, make private point numbers work correctly.
2041 This is completely missing in Apple's documentation: If a `gvar'
2042 tuple uses private point numbers (this is, deltas are specified for
2043 some points only), the uncovered points must be interpolated for
2044 this tuple similar to the IUP bytecode instruction. Examples that
2045 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
2047 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
2048 tt_handle_deltas): New functions.
2049 (TT_Vary_Get_Glyph_Deltas): Renamed to...
2050 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
2051 points and does no longer return an array of deltas.
2052 Add tracing information.
2053 Call `tt_handle_deltas' to interpolate missing deltas.
2054 Also fix a minor memory leak in case of error.
2056 * src/truetype/ttgxvar.h: Updated.
2058 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
2059 load_truetype_glyph): Updated.
2061 2015-05-31 Werner Lemberg <wl@gnu.org>
2063 [truetype] In GX, make intermediate tuplets work at extrema.
2065 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
2067 2015-05-31 Werner Lemberg <wl@gnu.org>
2069 [truetype] Add tracing information to GX code.
2071 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2072 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
2073 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
2075 2015-05-28 Werner Lemberg <wl@gnu.org>
2077 * src/tools/apinames.c (names_dump): Fix invalid reference.
2079 Problem reported by Guzman Mosqueda, Jose R
2080 <jose.r.guzman.mosqueda@intel.com>.
2082 2015-05-24 Werner Lemberg <wl@gnu.org>
2084 [truetype] Fix commit from 2015-05-22.
2086 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
2087 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
2089 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
2091 2015-05-23 Werner Lemberg <wl@gnu.org>
2093 [truetype] Fix return values of GETINFO bytecode instruction.
2095 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
2096 `vertical_lcd' and `gray_cleartype'.
2098 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
2099 Change `symmetrical smoothing' to TRUE, since FreeType produces
2102 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
2103 values for symmetrical smoothing, namely 11/18.
2104 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
2107 2015-05-23 Werner Lemberg <wl@gnu.org>
2111 * src/truetype/ttinterp.h (TT_ExecContext):
2112 s/subpixel/subpixel_hinting.
2114 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
2116 2015-05-22 Werner Lemberg <wl@gnu.org>
2118 [truetype] Support selector index 3 of the INSTCTRL instruction.
2120 This flag activates `native ClearType hinting', disabling backwards
2121 compatibility mode as described in Greg Hitchcocks whitepaper. In
2122 other words, it enables unrestricted functionality of all TrueType
2123 instructions in ClearType.
2125 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
2127 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
2128 `GS.instruct_control' is active.
2130 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
2131 (Ins_GETINFO): Updated.
2133 * docs/CHANGES: Document it.
2135 2015-05-20 Werner Lemberg <wl@gnu.org>
2139 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
2142 2015-05-17 Werner Lemberg <wl@gnu.org>
2144 [truetype] Fix loading of composite glyphs.
2146 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
2147 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
2148 unsigned. I trust `ttx' (which has exactly such code) that it does
2149 the right thing here...
2151 The reason that noone has ever noticed this bug is probably the fact
2152 that point-aligned subglyphs are rare, as are subglyphs with a
2153 number of points in the range [128;255], which is quite large (or
2154 even in the range [32768;65535], which is extremely unlikely).
2156 2015-05-12 Chris Liddell <chris.liddell@artifex.com>
2158 [cff] Make the `*curveto' operators more tolerant.
2160 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
2161 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
2162 pulling values off the stack until the stack is exhausted.
2163 Implicitly the stack must be a multiple (or for subtly different
2164 behaviour) a multiple plus a specific number of extra values deep.
2165 If that's not the case, enforce it (as the old code did).
2167 2015-05-12 Chris Liddell <chris.liddell@artifex.com>
2169 [cff] fix incremental interface with new cff code.
2171 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
2172 interface to retrieve glyph data for a SEAC, it be left to the
2173 incremental interface callback to apply the encoding to raw
2174 character index (as it was in the previous code).
2176 2015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2178 [autofit] Speed up IUP.
2180 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
2181 the same position from true interpolation, use `scale' to reduce
2184 2015-04-28 Werner Lemberg <wl@gnu.org>
2186 [cff] Use `name' table for PS name if we have a SFNT-CFF.
2188 This follows the OpenType 1.7 specification. See
2190 http://tug.org/pipermail/tex-live/2015-April/036634.html
2194 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
2197 2015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
2199 [truetype] Speed up IUP.
2201 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
2202 snapping to the same position from true interpolation.
2204 2015-04-21 Werner Lemberg <wl@gnu.org>
2206 [autofit] By default, enable warping code but switch off warping.
2208 Suggested by Behdad.
2210 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
2212 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
2215 2015-04-21 Werner Lemberg <wl@gnu.org>
2217 * docs/CHANGES: Updated.
2219 2015-04-21 Werner Lemberg <wl@gnu.org>
2221 [autofit] Introduce `warping' property.
2223 This code replaces the debugging hook from the previous commit with
2224 a better, more generic solution.
2226 * include/ftautoh.h: Document it.
2228 * src/autofit/afmodule.h (AF_ModuleRec)
2229 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
2231 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
2232 (af_property_set, af_property_get, af_autofitter_init)
2233 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
2235 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
2236 longer existing `_af_debug_disable_warper'.
2238 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
2239 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
2240 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
2241 scaler flags if warping is off.
2243 * src/autofit/aftypes.h: Updated.
2245 2015-04-16 Werner Lemberg <wl@gnu.org>
2247 [autofit] Add debugging hook to disable warper.
2249 * src/autofit/afmodule.c (_af_debug_disable_warper)
2250 [FT_DEBUG_AUTOFIT]: New global variable.
2252 * src/autofit/aftypes.h: Updated.
2253 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
2255 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
2257 * src/autofi/aflatin.c (af_latin_hints_apply)
2258 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
2261 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
2262 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
2264 * src/autofit/aflatin2.c (af_latin2_hints_apply)
2265 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
2267 2015-04-10 Werner Lemberg <wl@gnu.org>
2269 [cff] Update advance width handling to OpenType 1.7.
2271 Problem reported by Behdad.
2273 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
2276 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
2277 bearing values from `hmtx' table if present.
2279 2015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2281 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
2283 2015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2285 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
2287 2015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2289 [autofit] Finish the thought.
2291 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
2292 is never negative so that its `FT_ABS' is not necessary.
2294 2015-04-01 Werner Lemberg <wl@gnu.org>
2296 [autofit] Call dumper functions for tracing.
2298 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
2299 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
2301 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
2303 2015-04-01 Werner Lemberg <wl@gnu.org>
2305 [autofit] Make debugging stuff work again.
2307 The interface to ftgrid was broken in the series of commits starting
2310 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
2314 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
2315 Use a global AF_GlyphHintsRec object for debugging.
2316 (af_autofitter_done, af_autofitter_load_glyph): Updated.
2318 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
2320 2015-04-01 Werner Lemberg <wl@gnu.org>
2322 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
2324 2015-03-29 Werner Lemberg <wl@gnu.org>
2326 [cff] Fix Savannah bug #44629.
2328 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
2329 (CFF_MAX_SUBRS_CALLS): Set to 16.
2331 2015-03-29 Werner Lemberg <wl@gnu.org>
2333 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
2335 This commit allows `num_coords' to be larger or smaller than the
2336 number of available axes while selecting a design instance, either
2337 ignoring excess data or using defaults if data is missing.
2339 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
2342 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
2343 T1_Set_Var_Design): Ditto.
2345 2015-03-29 Werner Lemberg <wl@gnu.org>
2349 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
2351 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
2353 2015-03-27 Werner Lemberg <wl@gnu.org>
2355 [cff] Trace charstring nesting levels.
2357 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
2358 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
2360 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
2361 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
2363 2015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
2365 [base] Optimize `FT_Angle_Diff'.
2367 Under normal circumstances we are usually close to the desired range
2368 of angle values, so that the remainder is not really necessary.
2370 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
2372 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
2374 2015-03-21 Werner Lemberg <wl@gnu.org>
2376 [truetype] Improve `gvar' handling.
2378 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
2379 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
2382 2015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
2384 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
2386 2015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2388 Fix Savannah bug #44412 (part 2).
2390 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
2392 2015-03-11 Werner Lemberg <wl@gnu.org>
2394 [autofit] Add support for Arabic script.
2396 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
2398 * src/autofit/afblue.dat: Add blue zone data for Arabic.
2400 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2402 * src/autofit/afscript.h: Add Arabic standard characters.
2404 * src/autofit/afranges.c: Add Arabic data.
2406 * src/autofit/afstyles.h: Add Arabic data.
2408 * docs/CHANGES: Document it.
2410 2015-03-11 Werner Lemberg <wl@gnu.org>
2412 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
2414 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
2416 (FT_SERVICE_FONT_FORMAT_H): This.
2418 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
2420 (FT_FONT_FORMAT_*): This.
2422 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
2423 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
2424 src/truetype/ttdriver.c, src/type1/t1driver.c,
2425 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
2427 2015-03-11 Werner Lemberg <wl@gnu.org>
2429 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
2431 * include/config/ftheader.h: Implement it.
2432 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
2434 2015-03-11 Werner Lemberg <wl@gnu.org>
2436 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
2438 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
2440 * docs/CHANGES: Updated.
2442 2015-03-11 Werner Lemberg <wl@gnu.org>
2444 Fix automatic copyright updating.
2446 * src/tools/update-copyright: Make scanning of `no-copyright'
2449 * src/tools/no-copyright: Don't include README in general.
2451 2015-03-11 Werner Lemberg <wl@gnu.org>
2453 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
2455 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
2456 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
2457 builds/mac/FreeType.m68k_far.make.txt,
2458 builds/mac/FreeType.ppc_carbon.make.txt,
2459 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
2460 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
2461 builds/wince/vc2008-ce/freetype.vcproj,
2462 builds/windows/vc2005/freetype.vcproj,
2463 builds/windows/vc2008/freetype.vcproj,
2464 builds/windows/vc2010/freetype.vcxproj,
2465 builds/windows/vc2010/freetype.vcxproj.filters,
2466 builds/windows/visualc/freetype.dsp,
2467 builds/windows/visualc/freetype.vcproj,
2468 builds/windows/visualce/freetype.dsp,
2469 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
2470 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
2471 src/base/ftfntfmt.c, vms_make.com: Updated.
2473 2015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2475 Fix Savannah bug #44412 (part 1).
2477 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
2479 2015-03-10 Werner Lemberg <wl@gnu.org>
2481 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
2483 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
2486 * docs/CHANGES: Updated.
2488 2015-03-06 Werner Lemberg <wl@gnu.org>
2490 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
2494 2015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
2496 * src/base/ftstroke.c: Simplify.
2498 2015-03-04 Werner Lemberg <wl@gnu.org>
2500 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
2502 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
2503 of `point_cnt' if two bytes are read.
2504 Use a more vertical coding style.
2505 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
2506 Use a more vertical coding style.
2508 2015-03-03 Werner Lemberg <wl@gnu.org>
2510 [autofit] Fix Savannah bug #44241.
2512 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
2513 with less than 3 points.
2515 2015-03-02 Werner Lemberg <wl@gnu.org>
2517 Simplify `TYPEOF' macro.
2519 No need for two arguments.
2521 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2522 builds/vms/ftconfig.h (TYPEOF): Updated.
2524 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2525 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
2527 2015-03-01 Werner Lemberg <wl@gnu.org>
2529 Various compiler warning fixes for `make multi'.
2531 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
2532 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
2533 af_latin_hint_edges), src/autofit/aflatin2.c
2534 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
2537 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
2539 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
2540 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
2542 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
2543 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
2545 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
2547 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
2549 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
2552 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
2554 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
2556 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
2557 * src/truetype/ttsubpix.c (is_member_of_family_class,
2558 is_member_of_style_class): Declare as `static'.
2560 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
2562 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
2564 (T1_FIELD_COUNT): Removed. Unused.
2565 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
2567 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
2569 2015-02-25 Werner Lemberg <wl@gnu.org>
2571 [psaux] Signedness fixes.
2573 * include/internal/psaux.h, src/psaux/afmparse.c,
2574 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
2575 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
2577 2015-02-25 Werner Lemberg <wl@gnu.org>
2579 [otvalid] Signedness fixes.
2581 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
2582 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
2585 2015-02-25 Werner Lemberg <wl@gnu.org>
2587 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
2589 2015-02-25 Werner Lemberg <wl@gnu.org>
2591 [lzw] Signedness fixes.
2593 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
2595 2015-02-25 Werner Lemberg <wl@gnu.org>
2597 [gxvalid] Signedness fixes.
2599 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
2600 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
2601 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
2602 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
2603 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
2604 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
2605 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
2607 2015-02-25 Werner Lemberg <wl@gnu.org>
2609 [cache] Signedness fixes.
2611 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
2612 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
2614 2015-02-25 Werner Lemberg <wl@gnu.org>
2616 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
2618 This doesn't break ABI.
2620 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
2621 `width' and `height'.
2623 * docs/CHANGES: Document it.
2625 2015-02-25 Werner Lemberg <wl@gnu.org>
2627 [cache] Don't use `labs'.
2629 This is the only place in FreeType where this function was used.
2631 * include/config/ftstdlib.h (ft_labs): Remove.
2633 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
2636 2015-02-23 Werner Lemberg <wl@gnu.org>
2638 [cache] Replace `FT_PtrDist' with `FT_Offset'.
2640 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
2641 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
2642 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
2643 causing zillions of signedness warnings. [Note that `hash' was of
2644 type `FT_UInt32' before the change to `FT_PtrDist'.]
2647 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
2648 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
2650 2015-02-23 Werner Lemberg <wl@gnu.org>
2652 [smooth, raster] Re-enable standalone compilation.
2654 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
2655 [_STANDALONE_]: Define macros.
2657 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
2658 FT_HYPOT) [_STANDALONE_]: Define macros.
2660 2015-02-22 Werner Lemberg <wl@gnu.org>
2662 [smooth] Signedness fixes.
2664 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
2666 2015-02-22 Werner Lemberg <wl@gnu.org>
2668 * src/raster/ftraster.c: Use the file's typedefs everywhere.
2670 2015-02-22 Werner Lemberg <wl@gnu.org>
2672 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
2674 Bug introduced 6 commits earlier.
2676 2015-02-22 Werner Lemberg <wl@gnu.org>
2678 [pshinter] Fix thinko.
2680 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
2682 Bug introduced two commits earlier.
2684 2015-02-22 Werner Lemberg <wl@gnu.org>
2686 [raster] Signedness fixes.
2688 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
2690 2015-02-22 Werner Lemberg <wl@gnu.org>
2692 [pshinter] Signedness fixes.
2694 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
2695 src/pshinter/pshrec.c: Apply.
2697 2015-02-22 Werner Lemberg <wl@gnu.org>
2699 [pshinter] Use macros for (unsigned) flags, not enumerations.
2701 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
2703 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
2705 2015-02-22 Werner Lemberg <wl@gnu.org>
2707 * src/pshinter/pshrec.c: Simplify.
2708 (ps_hints_open, ps_hints_stem): Remove switch statement.
2710 2015-02-22 Werner Lemberg <wl@gnu.org>
2712 [sfnt] Signedness fixes.
2714 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
2715 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
2716 src/sfnt/ttsbit.c: Apply.
2717 * src/sfnt/sfdriver.c: Apply.
2718 (sfnt_get_ps_name): Simplify.
2720 2015-02-22 Werner Lemberg <wl@gnu.org>
2722 [bdf] Signedness fixes.
2724 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
2725 src/bdf/bdflib.c: Apply.
2727 2015-02-22 Werner Lemberg <wl@gnu.org>
2729 * src/bdf/bdflib.c (_bdf_atous): New function.
2730 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
2732 2015-02-22 Werner Lemberg <wl@gnu.org>
2734 [pcf] Signedness fixes.
2736 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
2737 * src/pcf/pcfread.c: Apply.
2738 (pcf_get_encodings): Ignore invalid negative encoding offsets.
2740 2015-02-21 Werner Lemberg <wl@gnu.org>
2742 * src/winfonts/winfnt.c: Signedness fixes.
2744 2015-02-21 Werner Lemberg <wl@gnu.org>
2746 [type42] Signedness fixes.
2748 * src/type42/t42parse.c, src/type42/t42parse.h,
2749 src/type42/t42types.h: Apply.
2751 2015-02-21 Werner Lemberg <wl@gnu.org>
2753 [pfr] Signedness fixes.
2755 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
2756 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
2757 src/pfr/pfrtypes.h: Apply.
2759 2015-02-21 Werner Lemberg <wl@gnu.org>
2761 [cff] Minor signedness fixes related to last commit.
2763 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
2765 2015-02-20 Werner Lemberg <wl@gnu.org>
2767 [cff] Thinkos in bias handling.
2769 Only the final result is always positive.
2771 Bug introduced three commits earlier.
2773 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
2775 2015-02-20 Werner Lemberg <wl@gnu.org>
2777 [cid] Fix signedness issues and emit some better error codes.
2779 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
2780 src/cid/cidparse.h: Apply.
2781 * src/cid/cidload.c: Apply.
2782 (parse_fd_array): Reject negative values for number of dictionaries.
2783 * src/cid/cidparse.c: Apply.
2784 (cid_parser_new): Reject negative values for hex data length.
2786 2015-02-20 Werner Lemberg <wl@gnu.org>
2788 [cff] Signedness fixes for new engine.
2790 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
2791 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
2793 2015-02-20 Werner Lemberg <wl@gnu.org>
2795 [cff] Signedness fixes for basic infrastructure and old engine.
2797 * include/internal/pshints.h, src/cff/cffdrivr.c,
2798 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
2799 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
2801 2015-02-19 Werner Lemberg <wl@gnu.org>
2803 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
2805 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
2806 version exists), but some fonts set it incorrectly.
2808 Problem reported by Adam Twardoch <adam@fontlab.com>.
2810 2015-02-19 Werner Lemberg <wl@gnu.org>
2812 [cff] Emit better error code for invalid private dict size.
2814 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
2815 values for size and offset.
2817 2015-02-19 Werner Lemberg <wl@gnu.org>
2819 [autofit] Fix signedness issues.
2821 * src/autofit/afangles.c, src/autofit/afcjk.c,
2822 src/autofit/afglobal.c, src/autofit/afhints.c,
2823 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
2824 src/autofit/hbshim.c: Apply.
2826 2015-02-19 Werner Lemberg <wl@gnu.org>
2828 [autofit] Use macros for (unsigned) flags, not enumerations.
2830 This harmonizes with other code in FreeType (and reduces the number
2831 of necessary casts to avoid compiler warnings).
2833 * src/autofit/afblue.hin: Make flag macros unsigned.
2834 * src/autofit/afblue.h: Regenerated.
2836 * src/autofit/afcjk.h: Replace flag enumeration with macros.
2837 * src/autofit/afcjk.c: Updated.
2839 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
2841 * src/autofit/afhints.c: Updated.
2843 * src/autofit/aflatin.h: Replace flag enumerations with macros.
2844 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
2846 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
2848 2015-02-18 Werner Lemberg <wl@gnu.org>
2850 [type1] Fix signedness issues.
2852 * include/internal/psaux.h, include/internal/t1types.h,
2853 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
2854 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
2856 2015-02-18 Werner Lemberg <wl@gnu.org>
2858 [psaux, type1] Fix minor AFM issues.
2860 * include/internal/t1types.h (AFM_KernPairRec): Make indices
2863 (AFM_FontInfoRec): Make element counters unsigned.
2865 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
2868 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
2869 Reject negative values for number of kerning elements.
2871 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
2873 2015-02-18 Werner Lemberg <wl@gnu.org>
2875 Don't use `FT_PtrDist' for lengths.
2877 Use FT_UInt instead.
2879 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
2880 T1_DecoderRec): Do it.
2882 * include/internal/t1types.h (T1_FontRec): Ditto.
2884 * src/cid/cidload.c (cid_parse_dict): Updated.
2885 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
2886 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
2887 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
2888 parse_chharstrings, parse_dict): Ditto.
2889 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
2890 t42_parse_dict): Ditto.
2892 2015-02-18 Werner Lemberg <wl@gnu.org>
2894 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
2895 This handles negative values better, avoiding many casts.
2897 2015-02-17 Werner Lemberg <wl@gnu.org>
2899 [base] Fix Savannah bug #44284.
2901 * src/base/ftcalc.c (FT_MulFix): Typos.
2903 2015-02-17 Werner Lemberg <wl@gnu.org>
2905 [truetype] Finish compiler warning fixes for signedness issues.
2907 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
2908 src/truetype/ttsubpix.h: Apply.
2910 2015-02-17 Werner Lemberg <wl@gnu.org>
2912 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
2914 2015-02-17 Werner Lemberg <wl@gnu.org>
2916 [truetype] More signedness fixes.
2918 * include/internal/tttypes.h, src/truetype/ttinterp.h,
2919 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
2920 src/truetype/ttobjs.c: Apply.
2922 2015-02-17 Werner Lemberg <wl@gnu.org>
2924 [truetype] Various signedness fixes.
2926 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
2928 * src/truetype/ttgload.c: Apply.
2929 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
2930 while constructing advance height.
2932 2015-02-16 Werner Lemberg <wl@gnu.org>
2934 [base] Finish compiler warning fixes for signedness issues.
2936 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
2939 2015-02-16 Werner Lemberg <wl@gnu.org>
2941 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
2943 2015-02-16 Werner Lemberg <wl@gnu.org>
2945 More minor signedness warning fixes.
2947 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
2948 src/base/ftutil.c: Apply.
2950 2015-02-16 Werner Lemberg <wl@gnu.org>
2952 Next round of minor compiler warning fixes.
2954 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
2956 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
2958 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
2960 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
2963 2015-02-16 Werner Lemberg <wl@gnu.org>
2965 Various minor signedness fixes.
2967 * include/ftadvanc.h, include/internal/ftobjs.h,
2968 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
2970 2015-02-16 Werner Lemberg <wl@gnu.org>
2974 This helps suppress signedness warnings, avoiding issues with
2975 implicit conversion changes.
2977 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2978 builds/vms/ftconfig.h (TYPEOF): Define.
2980 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2981 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
2983 2015-02-16 Werner Lemberg <wl@gnu.org>
2985 * src/base/ftsystem.c: Use casts in standard C function wrappers.
2986 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
2988 2015-02-16 Werner Lemberg <wl@gnu.org>
2990 Fix Savannah bug #44261.
2992 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
2993 environment also while calling the configure script.
2995 2015-02-16 Werner Lemberg <wl@gnu.org>
2997 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
2998 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
2999 FT_MEM_MOVE): Do it.
3001 2015-02-15 Werner Lemberg <wl@gnu.org>
3003 [base] Clean up signedness issues in `ftdbgmem.c'.
3005 Also fix other minor issues.
3007 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
3008 with FT_Long for consistency.
3009 (ft_mem_primes): Change type to `FT_Int'.
3010 (ft_mem_closest_prime, ft_mem_table_set): Updated.
3012 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
3013 ft_mem_debug_realloc): Use `static' keyword and fix signedness
3014 warnings where necessary.
3016 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
3017 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
3018 and add or remove casts to avoid signedness warnings.
3020 2015-02-15 Werner Lemberg <wl@gnu.org>
3022 [base] Clean up signedness in arithmetic functions.
3024 This makes the code more readable and reduces compiler warnings.
3026 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
3027 FT_DivFix): Convert input parameters to unsigned, do the
3028 computation, then convert the result back to signed.
3029 (ft_corner_orientation): Fix casts.
3031 2015-02-07 Werner Lemberg <wl@gnu.org>
3033 [sfnt] Fix Savannah bug #44184.
3035 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
3036 longer reject `htmx' and `vmtx' tables with invalid length but
3039 2015-02-06 Jon Anderson <jon@websupergoo.com>
3041 [truetype] Fix regression in the incremental glyph loader.
3043 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
3044 fonts, the glyph index may be greater than the number of glyphs
3045 indicated, so guard the check with a preprocessor conditional.
3047 2015-02-06 Werner Lemberg <wl@gnu.org>
3049 [autofit] Fix potential memory leak.
3051 While this doesn't show up with FreeType, exactly the same code
3052 leaks with ttfautohint's modified auto-hinter code (which gets used
3053 in a slightly different way).
3055 It certainly doesn't harm since it is similar to already existing
3056 checks in the code for embedded arrays.
3058 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
3059 and `max_points' for all cases.
3061 2015-01-31 Werner Lemberg <wl@gnu.org>
3063 [autofit] Add support for Thai script.
3065 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
3068 * src/autofit/afblue.dat: Add blue zone data for Thai.
3070 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3072 * src/autofit/afscript.h: Add Thai standard characters.
3074 * src/autofit/afranges.c: Add Thai data.
3076 * src/autofit/afstyles.h: Add Thai data.
3078 2015-01-23 Behdad Esfahbod <behdad@behdad.org>
3080 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
3082 This fixes a breakage caused by the commit `[raster] Remove
3083 5-level gray AA mode from monochrome rasterizer.'.
3085 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
3087 * src/raster/ftraster.c (ft_black_render): Handle
3088 `FT_RASTER_FLAG_AA'.
3090 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
3093 2015-01-18 Werner Lemberg <wl@gnu.org>
3095 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
3097 2015-01-18 Chris Liddell <chris.liddell@artifex.com>
3099 [raster] Fix Savannah bug #44022.
3101 Add fallback for glyphs with degenerate bounding boxes.
3103 If a glyph has only one very narrow feature, the bbox can end up
3104 with either the width or height of the bbox being 0, in which case
3105 no raster memory is allocated and no attempt is made to render the
3106 glyph. This is less than ideal when the drop-out compensation in
3107 the rendering code would actually result in the glyph being
3110 This problem can be observed with the `I' glyph (gid 47) in the
3111 Autodesk RomanS TrueType font.
3113 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
3114 dimension is zero to explicitly round up/down (instead of simply
3117 2015-01-17 Werner Lemberg <wl@gnu.org>
3119 Add some tools to handle yearly copyright notice updates.
3121 We are now following the GNU guidelines: A new release automatically
3122 means that the copyright year of all affected files gets updated; it
3123 is no longer used to track years of modification changes.
3125 * src/tools/update-copyright-year: New Perl script.
3126 * src/tools/update-copyright: New shell script that calls
3127 `update-copyright-year' on all files.
3128 * src/tools/no-copyright: Exceptions that should not be handled by
3131 2015-01-14 Werner Lemberg <wl@gnu.org>
3133 * docs/CHANGES: Updated, using a description from Behdad.
3135 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3137 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
3139 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3141 [autofit] Add embedded array of segments and edges.
3143 Avoids multiple mallocs per typical glyphs.
3145 With this and recent changes to avoid mallocs, the thread-safe
3146 stack-based loader is now as fast as the previous model that had one
3149 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
3151 (AF_AxisHintsRec): Add two arrays for segments and edges.
3153 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
3154 data if number of segments exceeds given threshold value.
3155 (af_axis_hints_new_edge): Only allocate data if number of edges
3156 exceeds given threshold value.
3157 (af_glyph_hints_done): Updated.
3159 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3161 [autofit] Add embedded arrays for points and contours.
3163 This avoids at least two malloc calls for typical glyphs.
3165 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
3167 (AF_GlyphHintsRec): Add two arrays for contours and points.
3169 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
3171 (af_glyph_hints_reload): Only allocate data if number of contours or
3172 points exceeds given threshold values.
3174 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3176 [autofit] Allocate hints object on the stack.
3178 This avoids one malloc per load.
3180 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
3184 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
3185 parameter instead of `FT_Memory'.
3186 (af_loader_done): Directly reset `load_hints'.
3187 (af_loader_load_g): Updated.
3189 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
3192 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3194 [autofit] Reuse slot glyph loader.
3196 No need to create a new glyph loader; we can reuse the one from
3197 `slot->internal->loader'. It's hard to tell why it was written that
3198 way originally, but new code looks sound and correct to me, and
3199 avoids lots of allocations.
3201 * src/autofit/afloader.c (af_loader_init): Change return type to
3203 Don't call `FT_GlyphLoader_New'.
3204 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
3205 (af_loader_load_g): Update code to use `internal->loader', which
3206 doesn't need copying of data.
3208 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
3211 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
3213 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3215 [autofit] Remove (unused) support for composite glyphs.
3217 We never have to deal with composite glyphs in the autohinter, as
3218 those will be loaded into FORMAT_OUTLINE by the recursed
3219 `FT_Load_Glyph' function.
3221 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
3222 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
3225 /* resolve load flags dependencies */
3227 if ( load_flags & FT_LOAD_NO_RECURSE )
3228 load_flags |= FT_LOAD_NO_SCALE |
3229 FT_LOAD_IGNORE_TRANSFORM;
3231 if ( load_flags & FT_LOAD_NO_SCALE )
3233 load_flags |= FT_LOAD_NO_HINTING |
3236 load_flags &= ~FT_LOAD_RENDER;
3239 and as such the auto-hinter is never called. Thus, the recursion in
3240 `af_loader_load_g' never actually happens. So remove the depth
3243 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
3245 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
3246 (af_loader_load_glyph): Updated.
3248 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3250 [raster] Fix uninitialized memory access.
3252 Apparently `ras.cProfile' might be uninitialized. This will be the
3253 case if `ras.top == ras.cProfile->offset', as can be seen in
3254 `End_Profile'. The overshoot code introduced in a change `Fix B/W
3255 rasterization of subglyphs with different drop-out modes.' (from
3256 2009-06-18) violated this, accessing `ras.cProfile->flags'
3257 unconditionally just before calling `End_Profile' (which then
3258 detected that `cProfile' is uninitialized and didn't touch it).
3260 This was harmless, and was not detected by valgrind before because
3261 the objects were allocated on the `raster_pool', which was always
3262 initialized. With recent change to allocate raster buffers on the
3263 stack, valgrind now reported this invalid access.
3265 * src/raster/ftraster.c (Convert_Glyph): Don't access an
3266 uninitialized `cProfile'.
3268 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3270 [smooth] Fix uninitialized memory access.
3272 Looks like `ras.span_y' could always be used without initialization.
3273 This was never detected by valgrind before because the library-wide
3274 `raster_pool' was used for the worker object and `raster_pool' was
3275 originally zero'ed. But subsequent reuses of it were using `span_y'
3276 uninitialized. With the recent change to not use `render_pool' and
3277 allocate worker and buffer on the stack, valgrind now detects this
3278 uninitialized access.
3280 * src/smooth/ftgrays.c (gray_raster_render): Initialize
3283 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3285 [base] Don't initialize unused `driver->glyph_loader'.
3287 * src/base/ftobjs.c (Destroy_Driver): Don't call
3288 `FT_GlyphLoader_Done'.
3289 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
3291 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3293 [base] Don't allocate `library->raster_pool' anymore.
3295 It's unused after the following commits:
3297 [raster] Allocate render pool for mono rasterizer on the stack.
3298 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
3300 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
3301 serve, which is, to adjust the pool size. But the pool is now
3302 allocated on the stack on demand.
3304 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
3306 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3308 [base] Do not reorder library->renderers upon use.
3310 Instead of keeping `library->renderers' in a MRU order, just leave
3311 it as-is. The MRU machinery wasn't thread-safe.
3313 With this patch, rasterizing glyphs from different faces from
3314 different threads doesn't fail choosing rasterizer
3315 (FT_Err_Cannot_Render_Glyph).
3317 Easiest to see that crash was to add a `printf' (or otherwise let
3318 thread yield in FT_Throw with debugging enabled).
3320 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
3321 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
3323 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3325 [raster] Allocate render pool for mono rasterizer on the stack.
3327 Instead of using the `render_pool' member of `FT_Library' that is
3328 provided down to the rasterizer, completely ignore that and allocate
3329 needed objects on the stack instead.
3331 With this patch, rasterizing glyphs from different faces from
3332 different threads doesn't crash in the monochrome rasterizer.
3334 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
3335 `buffer_size', and `worker' members.
3337 (ft_black_render): Create `buffer' locally.
3338 (ft_black_reset): Updated.
3340 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3342 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
3344 It was off by default and couldn't be turned on at runtime. And the
3345 smooth rasterizer superceded it over ten years ago. No point in
3346 keeping. Comments suggested that it was there for compatibility
3351 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
3352 RASTER_GRAY_LINES): Remove macros and all associated code.
3354 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
3355 (black_TRaster): Remove `grays' and `gray_width'.
3357 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
3358 ft_black_render): Updated.
3360 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
3361 (ft_raster5_renderer_class): Removed.
3363 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3365 [smooth] Allocate render pool for smooth rasterizer on the stack.
3367 Instead of using the `render_pool' member of `FT_Library' that is
3368 provided down to the rasterizer, completely ignore that and allocate
3369 needed objects on the stack instead.
3371 With this patch, rasterizing glyphs from different faces from
3372 different threads doesn't crash in the smooth rasterizer.
3376 https://bugzilla.redhat.com/show_bug.cgi?id=678397
3377 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
3378 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
3379 https://bugs.freedesktop.org/show_bug.cgi?id=69034
3381 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
3382 `buffer_size', `band_size', and `worker' members.
3384 (gray_raster_render): Create `buffer', `buffer_size', and
3385 `band_size' locally.
3386 (gray_raster_reset): Updated.
3388 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3390 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
3392 Previously the code had stipulation for using a per-TT_Size exec
3393 context if `size->debug' was true. But there was no way that
3394 `size->debug' could *ever* be true. As such, the code was always
3395 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
3396 This was, clearly, not threadsafe.
3398 With this patch, loading glyphs from different faces from different
3399 threads doesn't crash in the bytecode loader code.
3401 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
3402 (TT_DriverRec): Remove `context' member.
3404 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
3405 `TT_ExecContext' code related to a global `TT_Driver' object.
3407 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
3408 (tt_size_done_bytecode): ... here.
3410 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
3411 (tt_size_init_bytecode): ... here, only on demand.
3413 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
3415 (TT_New_Context): Remove `TT_ExecContext' code related to a global
3418 * src/truetype/ttinterp.h: Updated.
3420 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
3422 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3424 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
3426 Stop sharing a global `AF_Loader'. Allocate one on the stack during
3429 Right now this results in about 25% slowdown, to be fixed in a
3432 With this patch loading glyphs from different faces from different
3433 threads doesn't immediately crash in the autohinting loader code.
3437 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
3439 * src/autofit/afloader.c (af_loader_init): Pass
3440 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
3441 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
3443 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
3446 * src/autofit/afmodule.c (af_autofitter_init): Don't call
3448 (af_autofitter_done): Don't call `af_loader_done'.
3449 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
3451 * src/autofit/afloader.h: Include `afmodule.h'.
3453 Move typedef for `AF_Module' to...
3455 * src/autofit/afmodule.h: ... this place.
3456 No longer include `afloader.h'.
3458 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3460 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
3462 2015-01-12 Werner Lemberg <wl@gnu.org>
3464 Fix Savannah bug #43976.
3466 Assure that FreeType's internal include directories are found before
3467 `CPPFLAGS' (which might be set by the user in the environment), and
3468 `CPPFLAGS' before `CFLAGS'.
3470 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
3471 (FT_COMPILE): Make this a special variable for compiling only the
3472 files handled in `freetype.mk'.
3473 (.c.$O): Removed, unused.
3475 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
3477 2015-01-11 Werner Lemberg <wl@gnu.org>
3479 [truetype] Prettyfing.
3481 * src/truetype/ttinterp.c (project, dualproj, fast_project,
3482 fast_dualproj): Rename to...
3483 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
3485 2015-01-11 Werner Lemberg <wl@gnu.org>
3487 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
3489 Based on a patch from Behdad.
3491 2015-01-11 Werner Lemberg <wl@gnu.org>
3493 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
3495 2015-01-11 Werner Lemberg <wl@gnu.org>
3497 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
3499 2015-01-11 Werner Lemberg <wl@gnu.org>
3501 [truetype] More macro expansions.
3503 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
3506 2015-01-11 Werner Lemberg <wl@gnu.org>
3508 [truetype] More macro expansions.
3510 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
3511 adjusting funtion calls where necessary.
3512 (FT_UNUSED_ARG): Removed, no longer needed.
3514 2015-01-10 Werner Lemberg <wl@gnu.org>
3516 [truetype] More macro expansions.
3518 Based on a patch from Behdad.
3520 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
3522 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
3523 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
3525 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
3526 (Ins_SxyTCA): New function.
3528 2015-01-10 Werner Lemberg <wl@gnu.org>
3530 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
3532 Behdad suggested this code simplification, and nobody objected...
3534 * include/config/ftoption.h, devel/ftoption.h
3535 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
3537 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
3538 Remove related code.
3539 (ARRAY_BOUND_ERROR): Use do-while loop.
3541 2015-01-10 Werner Lemberg <wl@gnu.org>
3543 [truetype] More macro expansions.
3545 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
3546 EXEC_ARG): Remove by replacing with expansion.
3548 2015-01-10 Werner Lemberg <wl@gnu.org>
3550 [truetype] More macro expansions.
3552 Based on a patch from Behdad.
3554 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
3555 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
3556 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
3557 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
3558 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
3559 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
3562 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
3563 CUR_fast_dualproj): Replace with macros `project', `dualproj',
3564 `fast_project', `fast_dualproj'.
3566 2015-01-10 Werner Lemberg <wl@gnu.org>
3568 [truetype] More macro expansions.
3570 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
3573 2015-01-10 Werner Lemberg <wl@gnu.org>
3575 [truetype] Remove code for static TrueType interpreter.
3577 This is a follow-up patch.
3579 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
3580 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
3581 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
3583 2015-01-10 Werner Lemberg <wl@gnu.org>
3585 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
3587 This starts a series of patches that simplifies the code of the
3588 bytecode interpreter.
3591 ----------------------------------------------------------------------------
3594 David Turner, Robert Wilhelm, and Werner Lemberg.
3596 This file is part of the FreeType project, and may only be used, modified,
3597 and distributed under the terms of the FreeType project license,
3598 LICENSE.TXT. By continuing to use, modify, or distribute this file you
3599 indicate that you have read the license and understand and accept it
3604 version-control: never