12020-10-20 Werner Lemberg <wl@gnu.org> 2 3 * Version 2.10.4 released. 4 ========================== 5 6 7 Tag sources with `VER-2-10-4'. 8 9 * docs/VERSION.TXT: Add entry for version 2.10.4. 10 * docs/CHANGES: Updated. 11 12 * README, src/base/ftver.rc, builds/windows/vc2010/index.html, 13 builds/windows/visualc/index.html, 14 builds/windows/visualce/index.html, 15 builds/wince/vc2005-ce/index.html, 16 builds/wince/vc2008-ce/index.html, docs/freetype-config.1: 17 s/2.10.3/2.10.4/, s/2103/2104/. 18 19 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. 20 21 * builds/unix/configure.raw (version_info): Set to 23:4:17. 22 * CMakeLists.txt (VERSION_PATCH): Set to 4. 23 242020-10-19 Werner Lemberg <wl@gnu.org> 25 26 [sfnt] Fix heap buffer overflow (#59308). 27 28 This is CVE-2020-15999. 29 30 * src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier. 31 322020-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> 33 34 * src/sfnt/tt{colr,cpal}.c: Fix signedness warnings from VC++. 35 362020-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> 37 38 * src/sfnt/sfwoff2.c (Read255UShort): Tweak types to please VC++. 39 402020-10-10 Werner Lemberg <wl@gnu.org> 41 42 * Version 2.10.3 released. 43 ========================== 44 45 46 Tag sources with `VER-2-10-3'. 47 48 * docs/VERSION.TXT: Add entry for version 2.10.3. 49 50 * README, src/base/ftver.rc, builds/windows/vc2010/index.html, 51 builds/windows/visualc/index.html, 52 builds/windows/visualce/index.html, 53 builds/wince/vc2005-ce/index.html, 54 builds/wince/vc2008-ce/index.html, docs/freetype-config.1: 55 s/2.10.2/2.10.3/, s/2102/2103/. 56 57 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. 58 59 * builds/unix/configure.raw (version_info): Set to 23:3:17. 60 * CMakeLists.txt (VERSION_PATCH): Set to 3. 61 622020-09-25 Werner Lemberg <wl@gnu.org> 63 64 [autofit] Synchronize with ttfautohint. 65 66 This corresponds to the following commits in the ttfautohint git 67 repository: 68 69 bb6842bd3bd437b7b4a7921b0376c860f5e73d18 Typo, formatting. 70 d5c91ddb1cb310257a3dfe9a8e20e1fc51335faa Add Medefaidrin script. 71 72 * src/autofit/afblue.dat: Add blue zone data for Medefaidrin. 73 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 74 75 * src/autofit/afscript.h: Add Medefaidrin standard characters. 76 77 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Medefaidrin 78 data. 79 802020-09-25 Werner Lemberg <wl@gnu.org> 81 82 Move `scripts/make_distribution_archives.py` to `src/tools`. 83 84 * scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR, 85 _SCRIPT_DIR): Updated to new location. 86 (main): s/shutils.copyfile/shutils.copy/ to preserve file 87 permissions. 88 (main): Prefix source file paths with `git_dir` while copying files 89 to allow calls of the script from other places than the top-level 90 directory. 91 922020-09-24 Werner Lemberg <wl@gnu.org> 93 94 * src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`. 95 96 Towards the end of the the function there is a call to 97 `FT_Outline_Get_CBox` that retrieves the glyph bbox in scaled units. 98 That sets `horiBearing{X,Y}` and `vertBearingX` but `vertBearingY` 99 is left alone, and is not scaled. 100 101 Patch from Eric Muller <emuller@amazon.com>. 102 1032020-09-24 Werner Lemberg <wl@gnu.org> 104 105 * src/base/ftobjs.c (FT_Load_Glyph): Trace glyph metrics. 106 1072020-09-22 Werner Lemberg <wl@gnu.org> 108 109 [meson] Move auxiliary scripts to `builds/meson`. 110 111 Suggested by Alexei. 112 113 * scripts/*.py: Move meson scripts to... 114 * builds/meson/*.py: ... this new location. 115 116 * meson.build: Updated. 117 1182020-09-21 David Turner <david@freetype.org> 119 120 Add python script for building tarballs. 121 122 * scripts/make_distribution_archives.py: New file. 123 124 This standalone Python script should be equivalent to running `make 125 dist` with the Make-based build system, with the following minor 126 differences: 127 128 - Since `make distclean` doesn't always clean up `objs/` properly, 129 `make dist` archives may contain some stale binaries like 130 `objs/.libs/libfreetype.so.6` or others. 131 132 - `config.guess` and `config.sub` are not updated unless option 133 `--gnu-config-dir=DIR` is used to specify the location of these 134 files. 135 136 - Some bits of the auto-generated reference documentation may 137 appear in slightly different order, probably due to issues related 138 to mkdocs and docwriter. 139 140 As an example, the call 141 142 scripts/make_distribution_archives.py /tmp/freetype2-dist 143 144 creates the following files under `/tmp/freetype2-dist`: 145 146 freetype-<version>.tar.gz 147 freetype-<version>.tar.xz 148 ft<winversion>.zip 149 1502020-09-21 Werner Lemberg <wl@gnu.org> 151 152 * scripts/extract_freetype_version.py: Fix regex typos. 153 1542020-09-21 David Turner <david@freetype.org> 155 156 Add Meson build project file. 157 158 Example usage: 159 160 # Configure Meson build in directory `build-meson` to generate 161 # release binaries comparable to to the ones from the 162 # autotools/make build system. 163 meson setup build-meson \ 164 --prefix=/usr/local \ 165 --buildtype=debugoptimized \ 166 --strip \ 167 -Db_ndebug=true 168 169 # After configuring the Meson build with the above command, 170 # compile and install to `/usr/local/`; this includes a pkg-config 171 # file. 172 ninja -C build-meson install 173 174 # Alternatively, compile and install to `/tmp/aa/usr/local/...` 175 # for packaging. 176 DESTDIR=/tmp/aa ninja -C build-meson install 177 178 # Generate documentation under `build-meson/docs`. 179 ninja -C build-meson docs 180 181 Library size comparison for stripped `libfreetype.so` generated by 182 all three build systems: 183 184 - Default build (autotools + libtool): 712 KiB 185 - CMake build (RelWithDebInfo): 712 KiB 186 - Meson build: 712 KiB 187 188 189 * meson.build: New top-level Meson build file for the library. 190 191 * meson_options.txt: New file. It holds user-selectable options for 192 the build, which can be printed with `meson configure`, and selected 193 at `meson setup` or `meson --reconfigure` time with 194 `-D<option>=<value>`. 195 196 * scripts/parse_modules_cfg.py: A script invoked by `meson.build` to 197 parse `modules.cfg` and extract important information out of it 198 (i.e., the list of modules). 199 200 * scripts/process_ftoption_h.py: New script invoked by `meson.build` 201 to process the original `ftoption.h` file. It enables or disables 202 configuration macro variables based on the available dependencies. 203 This is similar to what other build systems are using (i.e., Meson's 204 `configure_file()` command is not used here). 205 206 * scripts/extract_freetype_version.py: New script invoked by 207 `meson.build` to extract the FreeType version number from 208 `<freetype/freetype.h>`. 209 210 * scripts/extract_libtool_version.py: New script invoked by 211 `meson.build` to extract the libtool `revision_info` data from 212 `builds/unix/configure.raw`, and to generate the corresponding 213 shared library suffix. 214 215 * scripts/generate_reference_docs.py: New script invoked by 216 `meson.build` to generate the FreeType 2 reference documentation 217 (using the `docwriter` and `mkdocs` packages, which must be already 218 installed). 219 2202020-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> 221 222 [raster] Improve the second pass (#58373). 223 224 Besides dropout control the second horizontal sweep is supposed to 225 clean up straight horizontal edges that are mishandled by the first 226 vertical sweep when a line passes through pixel centers. This line 227 would present as perfectly aligned span edges in the second sweep. 228 229 * src/raster/ftraster.c (Horizontal_Sweep_Span): Replace the old 230 implementation with a better one focusing on aligned span edges only. 231 2322020-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> 233 234 [raster] Tune SMART macro (#58352). 235 236 Windows seems to perform smart dropout control at 26.6 precision. 237 To mimick Windows independent of increased precision, we need to tweak 238 the macro so that some close calls break down rather than up. 239 240 * src/raster/ftraster.c (SMART): Tweak the macro. 241 2422020-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> 243 244 [raster] Introduce SMART macro. 245 246 * src/raster/ftraster.c (SMART): New macro for smart dropout rounding. 247 (Verstical_Sweep_Drop, Horizontal_Sweep_Drop): Use it. 248 2492020-09-03 Boris Dalstein <dalboris@gmail.com> 250 251 [build] Make CMake install basic version information. 252 253 * CMakeLists.txt: Do it. 254 2552020-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> 256 257 [truetype] Reduce Infinality footprint (cont'd). 258 259 * src/truetype/ttinterp.c (Ins_DELTAP): Shrink variable scope. 260 (Ins_SHPIX, Ins_MIRP): Revise if-logic. 261 2622020-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> 263 264 [truetype] Reduce Infinality footprint. 265 266 * src/truetype/ttinterp.c (Ins_SHPIX, Ins_MSIRP, Ins_MIAP, Ins_MDRP, 267 Ins_MIRP): Shrink variable scopes and consolidate ifdefs. 268 2692020-09-01 Alexei Podtelezhnikov <apodtele@gmail.com> 270 271 [truetype] Refactor compensation color. 272 273 * src/truetype/ttinterp.h (TT_Round_Func): Change the last argument. 274 * src/truetype/ttinterp.c (Ins_ROUND, Ins_NROUND, Ins_MDAP, Ins_MIAP, 275 Ins_MDRP, Ins_MIRP): Move compensation retrieval from here... 276 (Round_*): ... to here. 277 * src/truetype/ttobjs.c (tt_size_init_bytecode): Reserve zero 278 compensation at color index 3. 279 2802020-08-28 Alexei Podtelezhnikov <apodtele@gmail.com> 281 282 [smooth] Don't set target in direct mode. 283 284 * src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Remove assignment. 285 (ft_smooth_raster_lcd) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Ditto. 286 2872020-08-25 Alexei Podtelezhnikov <apodtele@gmail.com> 288 289 * src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Limit width. 290 291 Segmentation fault reported as 292 293 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24729 294 2952020-08-22 Werner Lemberg <wl@gnu.org> 296 297 * src/truetype/ttgload.c (TT_Get_VMetrics): Add tracing message. 298 2992020-08-05 Alexei Podtelezhnikov <apodtele@gmail.com> 300 301 [truetype] Retain OVERLAP_SIMPLE and OVERLAP_COMPOUND. 302 303 For glyphs with OVERLAP_SIMPLE or OVERLAP_COMPOUND, set 304 FT_OUTLINE_OVERLAP to render them with direct oversampling, which 305 mitigates artifacts (see 3bb512bc9f62). 306 307 * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Redefine to rhyme 308 with OVERLAP_SIMPLE. 309 * src/base/ftgloadr.c (FT_GlyphLoader_Rewind): Reset outline flags. 310 * src/truetype/ttgload.c 311 (TT_Load_Simple_Glyph): Retain OVERLAP_SIMPLE. 312 (load_truetype_glyph): Retain OVERLAP_COMPOUND. 313 3142020-08-04 Alexei Podtelezhnikov <apodtele@gmail.com> 315 316 * src/truetype/ttgload.c (TT_Load_Glyph): More tracing. 317 3182020-07-28 Alexei Podtelezhnikov <apodtele@gmail.com> 319 320 Hide internal functions with SunPro. 321 322 * include/freetype/internal/compiler-macros.h 323 (FT_INTERNAL_FUNCTION_ATTRIBUTE) <__SUNPRO_C>: Define as __hidden. 324 3252020-07-28 Anuj Verma <anujv@iitbhilai.ac.in> 326 327 Fix static compilation with Visual C. 328 329 * include/freetype/internal/compiler-macros.h 330 (FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty. 331 3322020-07-28 Priyesh Kumar <priyeshkkumar@gmail.com> 333 334 Fix `-Wformat' compiler warnings. 335 336 * src/*: Fix format specifiers. 337 338 * builds/unix/ftsystem.c (FT_Stream_Open): Ditto. 339 3402020-07-25 Werner Lemberg <wl@gnu.org> 341 342 Fix `-Wformat' compiler warnings. 343 344 Problem reported by Priyesh kumar <priyeshkkumar@gmail.com> 345 346 * src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments 347 to tracing macro. 348 349 * src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property): 350 Ditto. 351 352 * src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto. 353 Reformulate message. 354 355 * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto. 356 357 * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. 358 Trace table offset, too. 359 360 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto. 361 3622020-07-23 Werner Lemberg <wl@gnu.org> 363 364 * src/sfnt/sfwoff2.c (woff2_decompress): Fix compiler warning. 365 366 Reported by Hin-Tak. 367 3682020-07-12 Werner Lemberg <wl@gnu.org> 369 370 * builds/unix/configure.raw: Fix inclusion of `ftoption.h'. 371 3722020-07-07 Werner Lemberg <wl@gnu.org> 373 374 Fix clang warnings. 375 376 * include/freetype/internal/autohint.h 377 (FT_DECLARE_AUTOHINTER_INTERFACE): New macro. 378 * src/autofit/afmodule.h: Use it to declare 379 `af_autofitter_interface'. 380 381 * include/freetype/internal/ftobjs.h (FT_DECLARE_GLYPH): New macro. 382 * src/base/ftbase.h: Use it to declare `ft_bitmap_glyph_class' and 383 `ft_outline_glyph_class'. 384 385 * src/base/ftglyph.c: Include `ftbase.h'. 386 387 * src/cff/cffparse.c (cff_parser_run): Fix type of `t2_size'. 388 389 * src/pcf/pcfdrivr.c (pcf_cmap_char_next): Fix type of `result'. 390 391 * src/psaux/psauxmod.c (psaux_module_class): Use `FT_DEFINE_MODULE'. 392 * src/psaux/psauxmod.h: Declare `afm_parser_funcs', 393 `t1_cmap_classes', `cff_decoder_funcs', and `psaux_module_class'. 394 395 * src/pshinter/pshmod.c: Include `pshmod.h'. 396 397 * src/sfnt/sfwoff2.c (ROUND4, WRITE_SHORT): Fix implicit sign 398 conversion. 399 (compute_ULong_sum): Fix return type. 400 Fix implicit sign conversion. 401 (store_points): Fix type of `last_flag', `repeat_count', and `flag'. 402 Use casts to avoid warnings. 403 (reconstruct_glyf): Fix implicit sign conversion. 404 Use cast to avoid warning. 405 (get_x_mins): Fix implicit sign conversion. 406 * src/sfnt/ttcmap.c: Undef `TTCMAPCITEM'. 407 * src/sfnt/ttcmap.h: Define `TTCMAPCITEM' and include `ttcmapc.h' to 408 declare cmap classes. 409 410 * src/smooth/ftsmooth.c (ft_smooth_overlap_spans): Use cast. 411 412 * src/truetype/ttinterp.c (Ins_MIAP): Fix typo. 413 4142020-07-07 David Turner <david@freetype.org> 415 416 [build] Really fix multi and C++ builds. 417 418 The following builds were still failing due to previous changes: 419 420 make multi 421 make multi CC="c++" 422 make CC="c++" 423 424 This patch fixes the issues, which were missing includes to get the 425 right macro definitions in multi-build mode. 426 427 Also, `FT_UNUSED' is actually used by third-party code, so move it 428 back to `public-macros.h' to avoid breaking it. 429 430 * include/freetype/config/public-macros.h (FT_EXPORT): Remove 431 special definition for C++. 432 (FT_UNUSED): Define here instead of... 433 * include/freetype/config/compiler-macros.h: ... here. 434 (FT_FUNCTION_DECLARATION): Remove special definition for C++. 435 (FT_LOCAL_ARRAY_DEF): Fix definition. 436 437 * src/cache/ftccback.h, src/lzw/ftzopen.h, src/gxvalid/gxvmort.h, 438 src/gxvalid/gxvmorx.h: Add `FT_BEGIN_HEADER' and `FT_END_HEADER'. 439 4402020-07-06 David Turner <david@freetype.org> 441 442 [build] Fix multi and C++ builds. 443 444 The following builds were failing due to previous changes: 445 446 make multi 447 make multi CC="c++" 448 449 * include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'. 450 451 * include/freetype/config/ftheader.h (FT_BEGIN_HEADER, 452 FT_END_HEADER): Protect against redefinition. 453 454 * src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h, 455 src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h, 456 src/sfnt/woff2tags.h: Include `compiler-macros.h'. 457 458 * src/sfnt/woff2tags.c: Include `woff2tags.h'. 459 4602020-07-06 Werner Lemberg <wl@gnu.org> 461 462 [psaux] Improve `t1_decoder_parse_metrics' (#58646). 463 464 * src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy 465 corresponding code from old engine's `t1_decoder_parse_charstrings' 466 function to handle `op_callsubr' and `op_return'. 467 4682020-07-05 David Turner <david@freetype.org> 469 470 [build] Improve visibility support of library function names. 471 472 * include/freetype/config/public-macros.h 473 (FT_PUBLIC_FUNCTION_ATTRIBUTE): New macro to tag functions as 474 public (and thus exportable). 475 (FT_EXPORT): Use it. 476 477 * include/freetype/config/compiler-macros.h 478 (FT_INTERNAL_FUNCTION_ATTRIBUTE): New macro to tag functions as 479 internal to the library (and thus hidden). Note that on ELF 480 systems, all internal functions have hidden visibility, which avoids 481 the need to enforce this when invoking the compiler (e.g., with an 482 option like `-fvisibility=hidden'). 483 484 (FT_FUNCTION_DECLARATION, FT_FUNCTION_DEFINITION): New base macros 485 to deal with C and C++ linkage issues at the same time. 486 487 (FT_LOCAL, FT_LOCAL_DEF, FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF, 488 FT_BASE, FT_BASE_DEF, FT_EXPORT_VAR, FT_BASE_CALLBACK, 489 FT_BASE_CALLBACK_DEF): Redefined using new macros. 490 4912020-07-05 David Turner <david@freetype.org> 492 493 [build] Split off more stuff from `ftconfig.h'. 494 495 * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, 496 include/freetype/config/ftconfig.h: Split off macro definitions 497 required by the FreeType API headers to... 498 * include/freetype/config/public-macros.h: ...this new file. 499 500 * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, 501 include/freetype/config/ftconfig.h: Split off macro definitions used 502 by the library but not to be exposed to clients to... 503 * include/freetype/config/compiler-macros.h: ...this new file. 504 505 * include/freetype/internal/*.h, src/raster/ftraster.h: Include 506 `compiler-macros.h' where needed. 507 5082020-07-05 David Turner <david@freetype.org> 509 510 [build] Move mac support code to `mac-support.h'. 511 512 * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, 513 include/freetype/config/ftconfig.h: Split off mac-specific stuff 514 to... 515 * include/freetype/config/mac-support.h: ...this new file. 516 517 * CMakeLists.txt, builds/unix/configure.raw: Remove `/undef -> 518 #undef' string replacement; the affected code is no longer part of 519 the `ftconfig.h' template. 520 5212020-07-05 David Turner <david@freetype.org> 522 523 [build] Put integer type definitions into `integer-types.h'. 524 525 Refactor some of the `ftconfig.h' headers and template to move the 526 definition of the FreeType integer types (e.g., `FT_Int16') to a 527 common header file `freetype/config/integer-types.h'. 528 529 * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, 530 include/freetype/config/ftconfig.h: Split off integer type 531 definition stuff to... 532 * include/freetype/config/integer-types.h: ...this new file. 533 534 * builds/unix/ftconfig.h.in: Control the definition of 535 `FT_SIZEOF_INT' and `FT_SIZEOF_LONG' with macro 536 `FT_USE_AUTOCONF_SIZEOF_TYPES'. If these are not defined, auto 537 detection happens in `integer-types.h' as usual based on `INTXX_MAX' 538 values. Otherwise the autoconf-detected values are used. 539 540 * builds/unix/configure.raw (CPPFLAGS): Don't include path to 541 `config' directory. Instead, ... 542 (FT_CONFIG_STANDARD_LIBRARY_H): Use complete path. 543 5442020-07-05 David Turner <david@freetype.org> 545 546 [build] Rename `build/unix/ftconfig.in' to `ftconfig.h.in'. 547 548 Since we are no longer limited to 8.3 file names, it is simpler to 549 follow the usual conventions for template files. 550 551 * builds/unix/ftconfig.in: Renamed to... 552 * builds/unix/ftconfig.h.in: ...this. 553 554 * CMakeLists.txt, builds/unix/configure.raw: Updated. 555 5562020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> 557 558 [smooth] Introduce direct oversampling for overlaps. 559 560 This implements oversampling to mitigate artifacts in pixels partially 561 covered by overlapping contours. It turns out that the 4x4 562 oversampling is sufficient but, at least, quadruples the rendering 563 time. The outline has to set FT_OUTLINE_OVERLAP to use this method. 564 565 * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): New flag. 566 * src/smooth/ftsmooth.c (ft_smooth_render): Check it to... 567 (ft_smooth_raster_overlap): ... inflate outline and set up direct 568 rendering for oversampling with... 569 (ft_smooth_overlap_spans): ... new span function that integrates them. 570 5712020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> 572 573 [smooth] Use direct rendering mode in Harmony. 574 575 Instead of rendering 3 bitmaps side by side and reshuffling, we use 576 direct rendering to deliver the bitmaps on each third byte. 577 578 * src/smooth/ftsmooth.c (ft_smooth_raster_lcd) 579 [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Set up direct mode with... 580 (ft_smooth_lcd_spans): ... new span function. 581 5822020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> 583 584 [smooth] Separate LCD paths from gray rendering. 585 586 This makes `ft_smooth_render' a lot smaller and easier to follow. It 587 also cleanly separates Harmony and ClearType-style LCD rendering 588 algorithms. Now I only wish to move LCD filtering and geometry from 589 FT_Library to FT_Renderer. 590 591 * src/smooth/ftsmooth.c (ft_smooth_render): Move LCD code from here... 592 (ft_smooth_raster_lcd, ft_smooth_raster_lcdv): ... to here. 593 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Reorganize #ifdef's. 594 5952020-06-20 Sebastian Rasmussen <sebras@gmail.com> 596 597 [cff] Fix handling of `style_name == NULL' (#58630). 598 599 * src/cff/cffobjs.c (cff_face_init): If a call to `cff_strcpy' fails 600 by returning NULL in `cff_face_init', `remove_style' is still 601 called. This means that the NULL pointer is dereferenced, causing a 602 crash. 603 6042020-06-19 Sebastian Rasmussen <sebras@gmail.com> 605 606 [cff] Fix another two memory leaks (#58629). 607 608 * src/cff/cffobjs.c (cff_size_init): If a call to `funcs->create' 609 fails to allocate one of the `internal->subfont' variables, make 610 sure to free `internal->topfont' and any successfully allocated 611 subfonts. 612 6132020-06-19 Sebastian Rasmussen <sebras@gmail.com> 614 615 [psaux] Fix memory leak (#58626). 616 617 * src/psaux/psstack.c (cf2_stack_init): If `cf2_stack_init' fails to 618 allocate the stack, return error early. 619 6202020-06-19 Sebastian Rasmussen <sebras@gmail.com> 621 622 [base] Fix memory leak (#58624). 623 624 * src/base/ftobjs.c (FT_New_Size): Avoid trying to free 625 `size->internal' unless `size' has been allocated. This mistake 626 appeared in the fix for issue #58611. 627 6282020-06-19 Alexei Podtelezhnikov <apodtele@gmail.com> 629 630 [base] Rework d1180b5f9598 until further notice. 631 632 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large 633 outlines. 634 6352020-06-19 Sebastian Rasmussen <sebras@gmail.com> 636 637 [cff, cid] Fix segfaults in case of error (#58621). 638 639 * src/cff/cffobjs.c (cff_slot_done), src/cid/cidobjs.c 640 (cid_slot_done): If `ft_glyphslot_init' fails to allocate 641 `internal', then the class' `done_slot' callback (called by 642 `ft_glyphslot_done') must not dereference the pointer to `internal'. 643 6442020-06-19 Werner Lemberg <wl@gnu.org> 645 646 [base] Fix UBSAN error. 647 648 Reported as 649 650 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23166 651 652 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Avoid values 653 larger than 32 bits. 654 6552020-06-19 Werner Lemberg <wl@gnu.org> 656 657 [woff2] Fix segfault. 658 659 Reported as 660 661 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23402 662 663 * src/sfnt/sfwoff2.c (get_x_mins): Check whether `loca' table 664 exists. 665 6662020-06-19 Stephen McDowell <svenevs.dev@gmail.com> 667 668 [sfnt] Support Intel compilers. 669 670 * src/sfnt/pngshim.c (premultiply_data): Intel compilers do not 671 currently support `__builtin_shuffle'. 672 6732020-06-19 Sebastian Rasmussen <sebras@gmail.com> 674 675 [base] Fix memory leak (#58611). 676 677 * src/base/ftobjs.c (FT_New_Size): When the call to `clazz->init_size' 678 fails, make sure to free `size->internal'. 679 6802020-06-19 Sebastian Rasmussen <sebras@gmail.com> 681 682 [cff] Fix memory leak (#58610). 683 684 * src/cff/cffobjs.c (cff_size_init): When the call to 685 `funcs->create' fails, make sure to free `internal'. 686 6872020-06-19 Werner Lemberg <wl@gnu.org> 688 689 * src/cff/cffload.c (cff_index_get_pointers): Rename `t' to `tbl'. 690 6912020-06-19 Sebastian Rasmussen <sebras@gmail.com> 692 693 [cff] Free table upon error allocating other data (#58609). 694 695 * src/cff/cffload.c (cff_index_get_pointers): When new_bytes fails 696 to allocate, make sure to free the table. Do the same for both 697 allocations if there is a later error. 698 6992020-06-13 Werner Lemberg <wl@gnu.org> 700 701 Remove redundant inclusion of `ft2build.h'. 702 703 * */*: Remove `#include <ft2build.h>' where possible. 704 705 * include/freetype/freetype.h: Remove cpp error about missing 706 inclusion of `ft2build.h'. 707 7082020-06-08 David Turner <david@freetype.org> 709 710 Make macros for header file names optional. 711 712 We no longer have to take care of the 8.3 file name limit; this 713 allows us (a) to introduce longer, meaningful file names, and (b) to 714 avoid macro names in `#include' lines altogether since some 715 compilers (most notably Visual C++) doesn't support this properly. 716 717 */*: Replace 718 719 #include FOO_H 720 721 with 722 723 #include <freetype/foo.h> 724 725 or something similar. Also update the documentation. 726 7272020-06-02 Werner Lemberg <wl@gnu.org> 728 729 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Trace number of cmaps. 730 7312020-05-18 David Turner <david@freetype.org> 732 733 Remove obsolete HAVE_STDINT_H probing macro. 734 735 This macro was updated by the unix configure script and the 736 `CMakeLists.txt' one, but is never used in the source tree (nor is 737 <stdint.h> included anywhere). 738 739 * CMakeLists.txt, builds/unix/ftconfig.in: Don't handle 740 `HAVE_STDINT_H'. 741 7422020-05-18 David Turner <david@freetype.org> 743 744 Remove Jamfile files from the tree. 745 746 These have not been used in a very, very long time, so better remove 747 them. A corresponding patch will be submitted to the 748 `freetype2-demos' repository. 749 750 * src/Jamfile, src/*/Jamfile, Jamrules: Delete. 751 7522020-05-12 Alexei Podtelezhnikov <apodtele@gmail.com> 753 754 [smooth] Turn on LCD filtering during FreeType initialization. 755 756 * src/smooth/ftsmooth.c (ft_smooth_init): Enable LCD filtering. 757 758 * include/freetype/ftlcdfil.h: Document it, remove patent warnings. 759 * include/freetype/freetype.h (FT_Render_Mode): Updated. 760 * include/freetype/config/ftoption.h, devel/ftoption.h 761 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Do not mention patents. 762 7632020-05-11 Alexei Podtelezhnikov <apodtele@gmail.com> 764 765 [smooth] Stop using dedicated LCD modules and classes. 766 767 The LCD modules were never truly independent. They mostly served as 768 a way to disable patented LCD rendering, which is no longer necessary. 769 The `smooth' module now handles LCD modes as well. 770 771 * src/smooth/ftsmooth.c (ft_smooth_lcd_renderer_class. 772 ft_smooth_lcdv_renderer_class): Deleted. 773 (ft_render_smooth): Reworked from `ft_render_smooth_generic'. 774 * src/smooth/ftsmooth.h: Remove dedicated LCD classes. 775 * src/smooth/module.mk: Remove dedicated LCD modules. 776 * include/freetype/config/ftmodule.h: Ditto. 777 * builds/amiga/include/config/ftmodule.h: Ditto. 778 * include/freetype/ftmodapi.h: Do not mention LCD modules. 779 7802020-05-09 Werner Lemberg <wl@gnu.org> 781 782 * Version 2.10.2 released. 783 ========================== 784 785 786 Tag sources with `VER-2-10-2'. 787 788 * docs/VERSION.TXT: Add entry for version 2.10.2. 789 790 * README, Jamfile (RefDoc), src/base/ftver.rc, 791 builds/windows/vc2010/index.html, builds/windows/visualc/index.html, 792 builds/windows/visualce/index.html, 793 builds/wince/vc2005-ce/index.html, 794 builds/wince/vc2008-ce/index.html, docs/freetype-config.1: 795 s/2.10.1/2.10.2/, s/2101/2102/. 796 797 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. 798 799 * builds/unix/configure.raw (version_info): Set to 23:2:17. 800 * CMakeLists.txt (VERSION_PATCH): Set to 2. 801 802 * docs/CHANGES: Updated. 803 8042020-05-08 Jakub Alba <jalba@vewd.com> 805 806 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#58319). 807 808 The font that exceeds the old limit is Icono Regular, version 809 1.00000. 810 8112020-05-03 Alexei Podtelezhnikov <apodtele@gmail.com> 812 813 * builds/freetype.mk: Refactor for readability. 814 8152020-05-02 Alexei Podtelezhnikov <apodtele@gmail.com> 816 817 [builds] Clean up Windows CE project files. 818 819 Remove version from filenames that caused a lot of polution in the 820 release process. Use VERSIONINFO resource instead. 821 822 * builds/wince/vc2005-ce/freetype.vcproj, 823 builds/wince/vc2008-ce/freetype.vcproj, 824 builds/windows/visualce/freetype.vcproj, 825 builds/windows/visualce/freetype.dsp: s/2101//g, but add `ftver.rc'. 826 * builds/wince/vc2008-ce/index.html, 827 builds/wince/vc2005-ce/index.html, 828 builds/windows/visualce/index.html: s/2101//g. 829 8302020-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> 831 832 * devel/ft2build.h: Override FT_CONFIG_MODULES_H here as well. 833 8342020-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> 835 836 [builds/unix] Consolidate marco overrides (for the demos to see them). 837 838 * builds/unix/unix-cc.in (FT_CONFIG_MODULES_H, FT_CONFIG_OPTIONS_H): 839 Override them here... 840 * builds/freetype.mk: ... instead of here. 841 8422020-04-08 Werner Lemberg <wl@gnu.org> 843 844 Allow setting `CC' in Unix build (#58051). 845 846 * builds/unix/unix-cc.in (CC): Use `override'. The command line 847 value of `CC' (if any) is stored already in `CCraw'. 848 8492020-04-04 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 850 851 [woff2] Return if single stream operation fails. 852 853 * src/sfnt/sfwoff2.c (get_x_mins): Do it. 854 855 * src/sfnt/woff2tags.c: Remove unused include. 856 8572020-03-22 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 858 859 [docs] Fix building docs if `srcdir' != `builddir'. 860 861 `docs/reference/*' was moved one directory up in commit 237fed6. 862 863 * builds/unix/unix-def.in (PIP): Remove variable. 864 865 * configure: Create `docs' directory and copy assets from 866 `docs/markdown'. 867 868 * docs/README: Output directory is `reference'. 869 8702020-03-21 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 871 872 [docwriter] Drop support for Python < 3.5. 873 874 Python versions < 3.5 have reached end-of-life and as such, no 875 security or bug fixes will be provided for those versions. See 876 877 https://devguide.python.org/#status-of-python-branches 878 879 for more information. 880 881 * Jamfile (RefDoc): Add `site' parameter. 882 883 * builds/detect.mk (std_setup): Update Python version requirement. 884 885 * builds/freetype.mk (refdoc-venv): Use pip as `python -m pip'. 886 887 * builds/unix/ax_compare_version.m4, 888 builds/unix/ax_prog_python_version.m4: Macros to detect Python 889 version. New files. 890 891 * builds/unix/configure.raw: Check for Python >= 3.5 and remove 892 check for `pip'. 893 894 * docs/CHANGES, docs/INSTALL.GNU, docs/README: Updated. 895 8962020-03-02 Moazin Khatti <moazinkhatri@gmail.com> 897 898 [gzip] Support `gzip' encoded header conditionally. 899 900 In order to support `gzip' encoded header the call to 901 `inflateInit2' was modified in commit 6a92b1fadde26477a9179. 902 However, this code breaks with the outdated internal version 903 of zlib. This is a temporary fix to conditionally support 904 `gzip' encoded header whenever a system installation of zlib 905 is being used. 906 907 Problem report in 908 909 https://lists.nongnu.org/archive/html/freetype-devel/2020-02/msg00023.html 910 911 * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Change the the call to 912 `inflateInit2' depending on whether the system installation is 913 being used or the internal copy. 914 9152020-02-29 Ben Wagner <bungeman@google.com> 916 917 [truetype] Fix state of `FT_Face' for buggy `gvar' tables (#57923). 918 919 By resetting the blend as implemented with this commit fonts with 920 invalid `gvar' tables may keep calling into `ft_var_load_gvar' from 921 `tt_set_mm_blend' and failing, but the font was invalid anyway and 922 we want to keep seeing the failure in `tt_set_mm_blend'. 923 924 * src/truetype/ttgxvar.c (ft_var_load_gvar): Calculate length of 925 offset array once. 926 Allocate arrays after `FT_FRAME_ENTER' (extra check before 927 allocating and avoid needing to free array later if error entering 928 frame). 929 Always call `FT_FRAME_EXIT'. 930 Consistently set counts immediately after array initialized. 931 Reset the blend (particularly `blend->glyphoffsets') on failure. 932 9332020-03-01 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 934 935 [docs] Update docwriter stylesheet. 936 937 This change is required to support docwriter 1.2.1. 938 939 See 940 941 https://github.com/freetype/docwriter/issues/36 942 943 for more information. 944 945 * docs/markdown/stylesheets/extra.css: 946 (.md-typeset code) -> (.md-typeset pre>code) 947 (pre) -> (pre>code) 948 (p, .md-typeset p, h4): Remove commented styles. 949 (table.index): Remove unused styles. 950 9512020-02-28 Ben Wagner <bungeman@google.com> 952 953 [truetype] Add better checks for loading `gvar' table (#57905). 954 955 * src/truetype/ttgxvar.c (ft_var_load_gvar): Delay settings of any 956 `blend->xxxcount' values until the corresponding data has been 957 checked. 958 Also do some sanitizing to avoid a too early exit. 959 960 (TT_Vary_Apply_Glyph_Deltas): Improve tracing message. 961 9622020-02-27 Werner Lemberg <wl@gnu.org> 963 964 Make `FT_HAS_*' and `FT_IS_*' really return true (#57906). 965 966 * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Implement it. 967 9682020-02-25 Dominik Röttsches <drott@chromium.org> 969 970 Fix for CFF space glyph regression (#57541). 971 972 * src/psaux/psft.c (cf2_decoder_parse_substrings): Replace early-out 973 with FT_OFFSET. 974 9752020-02-22 Werner Lemberg <wl@gnu.org> 976 977 [woff2] Fix font table access. 978 979 Reported as 980 981 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20778 982 983 * src/sfnt/sfwoff2.c (get_x_mins): Explicitly check for presence of 984 `head' table, which might not have been processed yet. 985 9862020-02-21 Werner Lemberg <wl@gnu.org> 987 988 [psaux] Make `t1_decoder_parse_metrics' handle `op_div' (#57519). 989 990 * src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy 991 corresponding code from old engine's `t1_decoder_parse_charstrings' 992 function. 993 9942020-02-19 Nikolaus Waxweiler <nikolaus.waxweiler@daltonmaag.com> 995 996 [autofit] Add support for Hanifi Rohingya script. 997 998 * src/autofit/afblue.dat: Add blue zone data for Hanifi Rohingya. 999 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 1000 1001 * src/autofit/afscript.h: Add Hanifi Rohingya standard character. 1002 1003 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Hanifi 1004 Rohingya data. 1005 10062020-02-19 Werner Lemberg <wl@gnu.org> 1007 1008 Require HarfBuzz 1.8. 1009 1010 * builds/unix/configure.raw, CMakeLists.txt: Request HarfBuzz 1.8.0 1011 or newer. 1012 1013 We are going to add auto-hinter support for Hanifi Rohingya, which 1014 was introduced in Unicode 11.0. 1015 10162020-02-12 Werner Lemberg <wl@gnu.org> 1017 1018 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Ignore version (#57708). 1019 10202020-02-04 Werner Lemberg <wl@gnu.org> 1021 1022 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#57732). 1023 1024 The font that exceeds the old limit is Constantine, version 1.001. 1025 10262020-01-04 Werner Lemberg <wl@gnu.org> 1027 1028 [base] Fix `FREETYPE_PROPERTIES=type1:hinting-engine=adobe`. 1029 1030 * src/base/ftpsprop.c (ps_property_set) [hinting-engine]: Avoid an 1031 incorrect return value that caused a warning. The function did the 1032 right thing, though. 1033 10342020-01-03 Werner Lemberg <wl@gnu.org> 1035 1036 [woff2] Fix memory leaks and a runtime warning. 1037 1038 Reported as 1039 1040 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19773 1041 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18101 1042 1043 * src/sfnt/sfwoff2.c (compute_ULong_sum): Add missing cast. 1044 (reconstruct_hmtx): Add missing deallocation calls. 1045 10462020-01-02 Dominik Röttsches <drott@chromium.org> 1047 1048 [truetype] Fix UBSan warning on offset to nullptr (#57501). 1049 1050 * src/truetype/ttinterp.c (Ins_CALL): Fail if `exc->FDefs' is null. 1051 10522019-12-31 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1053 1054 [woff2] Allow bitmap-only fonts (#57394). 1055 1056 * src/sfnt/sfwoff2.c (reconstruct_font): Fix test for `glyf' and 1057 `loca' tables. 1058 10592019-12-21 Hugh McMaster <hugh.mcmaster@outlook.com> 1060 1061 [docs] (2/2) Fix generation of API documentation (#56745). 1062 1063 Creating the API Reference in the (new) `reference' sub-directory is 1064 consistent with other documentation sub-topics, such as `design', 1065 `glyphs' and `tutorial'. 1066 1067 This patch fixes broken hyperlinks in the documentation pointing to 1068 and from the API Reference. It also allows web assets to load from 1069 their relative paths. 1070 1071 * builds/freetype.mk (DOC_DIR): Adjust. 1072 (refdoc, refdoc-venv): Add `--site' argument. 1073 1074 * builds/toplevel.mk (do-dist): Updated. 1075 10762019-12-21 Hugh McMaster <hugh.mcmaster@outlook.com> 1077 1078 [docs] (1/2) Move static web assets (#56745). 1079 1080 * docs/reference/*: Move ... 1081 * docs: ... one directory up. 1082 10832019-12-21 Dominik Röttsches <drott@chromium.org> 1084 1085 Fix more UBSan warnings on adding offset to nullptr (#57432). 1086 1087 * src/truetype/ttinterp.c (Ins_LOOPCALL), src/psaux/psft.c 1088 (cf2_initLocalRegionBuffer): Use `FT_OFFSET'. 1089 10902019-12-16 Werner Lemberg <wl@gnu.org> 1091 1092 [truetype] Fix UBSan warnings on adding offsets to nullptr. 1093 1094 Reported as 1095 1096 https://bugs.chromium.org/p/chromium/issues/detail?id=1032152 1097 1098 * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Use `FT_OFFSET'. 1099 11002019-12-14 Werner Lemberg <wl@gnu.org> 1101 1102 [truetype] Fix integer overflow. 1103 1104 Reported as 1105 1106 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19305 1107 1108 * src/truetype/ttinterp.c (Ins_MIRP): Use `ADD_LONG'. 1109 11102019-12-13 Werner Lemberg <wl@gnu.org> 1111 1112 Another bunch of UBSan warnings on adding offsets to nullptr. 1113 1114 Reported as 1115 1116 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19427 1117 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19433 1118 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19441 1119 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19451 1120 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19452 1121 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19457 1122 1123 * src/autofit/aflatin.c (af_latin_hints_compute_segments, 1124 af_latin_hints_compute_edges): Use `FT_OFFSET'. 1125 1126 * src/base/ftstream.c (FT_Stream_EnterFrame): Use `FT_OFFSET'. 1127 1128 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Exit early 1129 if there is no charstring. 1130 1131 * src/psaux/psobjs.c (t1_decrypt): Use `FT_OFFSET'. 1132 1133 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Exit early for 1134 zero bitmap dimensions. 1135 11362019-12-09 Dominik Röttsches <drott@chromium.org> 1137 1138 Fix more UBSan warnings on adding offset to nullptr (#57384). 1139 1140 * src/smooth/ftsmooth.c (ft_smooth_render_generic), 1141 src/psaux/psobjs.c (ps_table_add): Use `FT_OFFSET'. 1142 11432019-12-05 Werner Lemberg <wl@gnu.org> 1144 1145 * src/truetype/ttinterp.c (TT_RunIns): Use `FT_OFFSET'. 1146 1147 Reported as 1148 1149 https://bugs.chromium.org/p/chromium/issues/detail?id=1030614 1150 11512019-12-03 Werner Lemberg <wl@gnu.org> 1152 1153 More nullptr offset UBSan warnings (#57331, #57347). 1154 1155 * src/autofit/afcjk.c (af_cjk_hints_compute_segments), 1156 src/psaux/psft.c (cf2_getSeacComponent), src/truetype/ttinterp.c 1157 (Ins_UNKNOWN): Use `FT_OFFSET'. 1158 11592019-11-29 Dominik Röttsches <drott@chromium.org> 1160 1161 Avoid more nullptr offset UBSan warnings (#57316). 1162 1163 * src/base/ftoutln.c (FT_Outline_Transform): Bail on empty points. 1164 * src/cff/cffload.c (cff_subfont_load): Use `FT_OFFSET'. 1165 * src/psaux/psft.c (cf2_decoder_parse_substrings): Early out if 1166 `charstring_base' or `charstring_len' are null. 1167 * src/sfnt/ttload.c (tt_face_load_name): Use `FT_OFFSET'. 1168 11692019-11-23 John Stracke <jstracke@Google.com> 1170 1171 [base] Really fix #57194. 1172 1173 Apply accidentally missed second part of patch. 1174 1175 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Call 1176 `FT_GlyphLoader_CreateExtra'. 1177 11782019-11-23 Werner Lemberg <wl@gnu.org> 1179 1180 [truetype] Avoid sanitizer warning (#57289). 1181 1182 * src/truetype/ttpload.c (tt_face_get_device_metrics): Use 1183 `FT_OFFSET'. 1184 11852019-11-23 Armin Hasitzka <prince.cherusker@gmail.com> 1186 1187 [truetype] Fix integer overflow (#57287). 1188 1189 * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'. 1190 11912019-11-23 Ben Wagner <bungeman@google.com> 1192 1193 [sfnt] Avoid sanitizer warning (#57286). 1194 1195 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Avoid possible `NULL + 1196 offset' computation. 1197 Tag `table' as `const'. 1198 11992019-11-23 John Stracke <jstracke@Google.com> 1200 Werner Lemberg <wl@gnu.org> 1201 1202 [base] Fix `NULL + offset' sanitizer warnings (#57194). 1203 1204 * src/base/ftgloadr.c (FT_GlyphLoader_Adjust_Points, 1205 FT_GlyphLoader_Adjust_Subglyphs): Use `FT_OFFSET'. 1206 (FT_GlyphLoader_CreateExtra): Add short cut if some values are zero. 1207 12082019-11-23 Werner Lemberg <wl@gnu.org> 1209 1210 * include/freetype/internal/ftmemory.h (FT_OFFSET): New macro. 1211 1212 Use this for `base + offset' pointer calculations where `base' can 1213 be NULL (triggering a sanitizer warning even if the resulting 1214 pointer gets never dereferenced since it is undefined behaviour 1215 in C). 1216 1217 Suggested by Ben Wagner. 1218 12192019-11-23 Ben Wagner <bungeman@google.com> 1220 1221 [sfnt] Ensure OTTO fonts have tables (#57285). 1222 1223 * src/sfnt/ttload.c (tt_face_load_font_dir): Add test. 1224 12252019-11-23 Behdad Esfahbod <behdad@behdad.org> 1226 1227 Minor fixes for recent compilers. 1228 1229 * src/gzip/infutil.h (inflate_mask): Add `const'. 1230 1231 * src/autofit/aflatin2.c: Include `ft2build.h'. 1232 12332019-11-07 Nikolaus Waxweiler <madigens@gmail.com> 1234 1235 * CMakeLists.txt: Minor additions to the notes, compile 1236 builds/unix/ftsystem.c instead of src/base/ftsystem.c on UNIX. 1237 1238 The latter change is based on the code proposed by rim in #55235. 1239 12402019-10-25 Werner Lemberg <wl@gnu.org> 1241 1242 * src/sfnt/sfwoff2.c (woff2_open_font): Check `num_fonts' for TTCs. 1243 1244 Reported as 1245 1246 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18494 1247 12482019-10-22 Werner Lemberg <wl@gnu.org> 1249 1250 * src/sfnt/sfwoff2.c (woff2_open_font): Avoid undefined shift. 1251 1252 Also improve tracing. 1253 1254 Reported as 1255 1256 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18390 1257 12582019-10-10 Alexei Podtelezhnikov <apodtele@gmail.com> 1259 1260 * src/sfnt/pngshim.c (premultiply_data): Optimize for __SSE__ only. 1261 12622019-10-10 Werner Lemberg <wl@gnu.org> 1263 1264 * src/sfnt/sfwoff2.c (reconstruct_glyf): Check `triplet_size'. 1265 1266 Reported as 1267 1268 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18108 1269 12702019-10-09 John Tytgat <John.Tytgat@esko.com> 1271 1272 [cff] Fix FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts (#57023). 1273 1274 * src/cff/cffobjs.c (cff_face_init): Don't set 1275 FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts. 1276 12772019-10-08 Werner Lemberg <wl@gnu.org> 1278 1279 [woff2] Fix SFNT table checks. 1280 1281 Also reduce number of SFNT table lookups. 1282 1283 Reported as 1284 1285 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18065 1286 1287 * include/freetype/internal/wofftypes.h (WOFF2_InfoRec): Add fields 1288 `glyf_table', `loca_table', and `head_table'. 1289 1290 * src/sfnt/sfwoff2.c (reconstruct_glyf): Update signature. 1291 Use table pointers in `info' parameter. 1292 (get_x_mins): Check `maxp_table' 1293 Use table pointers in `info' parameter. 1294 (reconstruct_font): Use and set table pointers in `info' parameter. 1295 Fix check for `glyf' and `loca' tables. 1296 Update call to `reconstruct_glyf'. 1297 (woff2_open_font): Updated. 1298 12992019-10-06 Werner Lemberg <wl@gnu.org> 1300 1301 * src/sfnt/sfwoff2.c (reconstruct_glyf): Fix reallocation. 1302 1303 Reported as 1304 1305 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18046 1306 13072019-10-06 Werner Lemberg <wl@gnu.org> 1308 1309 Improve memory debugging. 1310 1311 * include/freetype/internal/ftmemory.h (FT_MEM_FREE): Use 1312 `FT_DEBUG_INNER' to set source code file name and line. 1313 1314 * src/base/ftdbgmem.c (ft_mem_table_remove): Better formatting of 1315 tracing message. 1316 13172019-10-03 Werner Lemberg <wl@gnu.org> 1318 1319 * src/sfnt/sfwoff2 (reconstruct_font): Fix reallocation. 1320 1321 Reported as 1322 1323 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17966 1324 13252019-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> 1326 1327 * src/base/ftstroke.c (ft_stroker_inside): Speed up. 1328 13292019-10-01 Werner Lemberg <wl@gnu.org> 1330 1331 * src/sfnt/sfwoff2 (woff2_open_font): Initialize `woff2.ttc_fonts'. 1332 1333 Reported as 1334 1335 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17804 1336 13372019-09-30 Werner Lemberg <wl@gnu.org> 1338 1339 * src/sfnt/sfwoff2.c (reconstruct_font): Fix memory leak. 1340 1341 Reported as 1342 1343 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17812 1344 13452019-09-30 Werner Lemberg <wl@gnu.org> 1346 1347 [woff2] Reject fonts without `head' table. 1348 1349 Also fix memory deallocation in case of error. 1350 1351 `head' problem reported as 1352 1353 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17820 1354 1355 * src/sfnt/sfwoff2.c (reconstruct_glyf): Don't use `stream_close'. 1356 Abort if `head_table' is NULL. 1357 Don't free `transformed_buf' in case of error. 1358 (woff2_open_font): Don't set `uncompressed_buf' to NULL. 1359 13602019-09-29 Werner Lemberg <wl@gnu.org> 1361 1362 [woff2] Fix compiler warnings. 1363 1364 Problem reported by Alexei. 1365 1366 * src/sfnt/sfwoff2.c (reconstruct_glyf): Initialize `x_min'. 1367 (reconstruct_font): Initialize `num_hmetrics'. 1368 (woff2_open_font): Initialize `info'. 1369 13702019-09-28 Werner Lemberg <wl@gnu.org> 1371 1372 * src/sfnt/sfwoff2.c (woff2_open_font): Fix sanity check. 1373 1374 Correct thinkos in patch from 2019-09-01. 1375 13762019-09-28 Werner Lemberg <wl@gnu.org> 1377 1378 [woff2] Fix memory leaks. 1379 1380 One of them reported as 1381 1382 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17766 1383 1384 * src/sfnt/sfwoff2.c (woff2_open_font): Free `info->x_mins' and 1385 `woff2->ttc_fonts'. 1386 1387 (reconstruct_glyf): Initialize `info->x_mins'. 1388 13892019-09-27 Alexei Podtelezhnikov <apodtele@gmail.com> 1390 1391 * src/base/ftstroke.c (ft_stroker_cap): Speed up caps. 1392 13932019-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> 1394 1395 * src/base/ftstroke.c (ft_stroker_outside): Speed up clipped miter. 1396 * include/freetype/ftstroke.h: Wordsmith miter docs. 1397 13982019-09-25 Werner Lemberg <wl@gnu.org> 1399 1400 * src/sfnt/sfwoff2.c (woff2_open_font): Check (sum of) table sizes. 1401 1402 Reported as 1403 1404 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17684 1405 14062019-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> 1407 1408 * src/base/ftstroke.c (ft_stroke_border_arcto): Speed up calculations. 1409 14102019-09-20 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1411 1412 [woff2] Fix memory leaks. 1413 1414 Reported as 1415 1416 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16896 1417 1418 * src/sfnt/sfwoff2.c (woff2_open_font): Fix error handling. 1419 Free `uncompressed_buf'. 1420 (reconstruct_font): Free `transformed_buf'. 1421 14222019-09-17 Werner Lemberg <wl@gnu.org> 1423 1424 * src/otvalid/otvcommon.c (otv_Coverage_get_last): Guard `count'. 1425 1426 Problem reported by Marc Schönefeld <marc.schoenefeld@gmx.org>. 1427 14282019-09-17 Werner Lemberg <wl@gnu.org> 1429 1430 * src/sfnt/sfwoff2.c (woff2_open_font): Check table index. 1431 1432 Reported as 1433 1434 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17100 1435 14362019-09-15 Avi Halachmi (:avih) <avihpit@yahoo.com> 1437 1438 [cmake] Don't fail if brotli is missing (#56894). 1439 1440 The libs which cmake controls are commented out at 1441 1442 include/freetype/config/ftoption.h 1443 1444 and cmake un-comment each enabled library, but the brotli option was 1445 not commented out, therefore `FT_CONFIG_OPTION_USE_BROTLI' remained 1446 defined even if brotli was missing/disabled/etc. 1447 1448 Comment it such that cmake can control it, which means leaving it 1449 undefined if brotli is missing. 1450 1451 * include/freetype/config/ftoption.h: Fix typo. 1452 14532019-09-05 Werner Lemberg <wl@gnu.org> 1454 1455 [cmake] Add brotli support. 1456 1457 * CMakeLists.txt (FT_WITH_BROTLI): New option. 1458 1459 * builds/cmake/FindBrotliDec.cmake: New file. 1460 14612019-09-05 Werner Lemberg <wl@gnu.org> 1462 1463 Fix handling of `AF_CONFIG_OPTION_INDIC'. 1464 1465 * devel/ftoption.h, include/freetype/config/ftoption.h: 1466 `AF_CONFIG_OPTION_INDIC' needs `AF_CONFIG_OPTION_CJK'. 1467 14682019-09-05 Werner Lemberg <wl@gnu.org> 1469 1470 CMakeLists.txt: Fix generation of DLL related stuff (#56852). 1471 1472 Extract `version_info' variable from `builds/unix/configure.raw' and 1473 use the data to correctly set `LIBRARY_VERSION' and 1474 `LIBRARY_SOVERSION'. 1475 1476 Also use the data to set `ft_version' field in `freetype2.pc'. 1477 Also fix the needed minimum version of HarfBuzz in `freetype2.pc'. 1478 14792019-09-03 Werner Lemberg <wl@gnu.org> 1480 1481 * src/sfnt/sfwoff2.c (compute_ULong_sum): Fix undefined shift. 1482 1483 Reported as 1484 1485 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16933 1486 14872019-09-01 Werner Lemberg <wl@gnu.org> 1488 1489 * src/sfnt/sfwoff2.c (woff2_open_font): Add sanity check. 1490 1491 Don't trust `totalSfntSize' unconditionally. 1492 1493 Reported as 1494 1495 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16893 1496 14972019-08-27 Dominik Röttsches <drott@chromium.org> 1498 1499 [woff2] Don't use `FT_UInt64' (#56815). 1500 1501 * src/sfnt/sfwoff2.c (woff2_open_font): Use `FT_UInt32' for 1502 `file_offset'. This fixes builds on platforms where `FT_LONG64' is 1503 not defined while still being sufficient to store a file offset. 1504 15052019-08-27 Werner Lemberg <wl@gnu.org> 1506 1507 [truetype] Prevent crash in `TT_Set_Named_Instance' (#56813). 1508 1509 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Fix error 1510 handling. 1511 15122019-08-27 Werner Lemberg <wl@gnu.org> 1513 1514 [woff2] Fix compiler warnings. 1515 1516 * src/sfnt/sfwoff2.c (read_num_hmetrics): Remove unused argument 1517 `table_len'. 1518 Update caller. 1519 (triplet_decode, compute_bbox, store_loca, reconstruct_glyf): Make 1520 `i' variable unsigned. 1521 (reconstruct_glyph): Remove condition which is always false. 1522 (reconstruct_html): Removed unused argument `transformed_size'. 1523 Update caller. 1524 1525 * src/sfnt/woff2tags.c (woff2_known_tags): Remove condition which is 1526 always false. 1527 15282019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1529 1530 [woff2] Check whether known tag is in array bounds. 1531 1532 If table tag is not 0x3f, we expect a value between 0 and 62. If 1533 this is not the case, exit with errors. 1534 1535 * src/sfnt/sfwoff2/c: Check whether table tag makes sense. 1536 1537 * src/sfnt/woff2tags.c: Return 0 if tag is out of bounds. 1538 15392019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1540 1541 * src/sfnt/sfwoff2.c: Improve trace comments. 1542 1543 Adjust tracing levels for comments, and more formatting. 1544 15452019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1546 1547 [woff2] Support `hmtx' reconstruction when `glyf' is untransformed. 1548 1549 `reconstruct_hmtx' requires `info->x_mins' and `info->num_glyphs' to 1550 reconstruct the hmtx table. In case glyf is not transformed, we 1551 call `get_x_mins' which does the necessary work. 1552 1553 * src/sfnt/sfwoff2.c (get_x_mins): New function. 1554 (reconstruct_font): Call get_x_mins. 1555 15562019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1557 1558 [sfnt] Support `face->num_faces' for WOFF2 fonts. 1559 1560 Set correct value of `face->num_faces' for WOFF2 fonts. This is 1561 being handled separately because we only load the tables for the 1562 requested font face in `woff2_open_font' and create a single-face 1563 sfnt stream. 1564 1565 The full discussion is at: 1566 1567 https://lists.gnu.org/archive/html/freetype-devel/2019-08/msg00000.html 1568 1569 * src/sfnt/sfobjs.c (sfnt_open_font): Add parameter 1570 `woff2_num_faces'. 1571 (sfnt_init_face): Introduce variable `woff2_num_faces', and change 1572 `face->root.num_faces' if `woff2_num_faces' is set. 1573 1574 * src/sfnt/sfwoff2.c (woff2_open_font): Validate requested face 1575 index and handle negative face indices. 1576 1577 * src/sfnt/sfwoff2.h (woff2_open_font): Add parameter `num_faces' to 1578 declaration. 1579 15802019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1581 1582 [woff2] Improve memory and error handling. 1583 1584 Free up memory after use, and improve error handling. 1585 1586 * src/sfnt/sfwoff2.c (reconstruct_font, woff2_open_font): Implement 1587 changes. 1588 15892019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1590 1591 [woff2] Avoid too many calls to `FT_REALLOC'. 1592 1593 We do this by using `totalSfntSize' as an initial reference, and 1594 extending the buffer when required. This reduces rendering time 1595 considerably. 1596 1597 * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec): Add 1598 `totalSfntSize', rename `total_sfnt_size' to `actual_sfnt_size'. 1599 1600 * src/sfnt/sfwoff2.c (write_buf): Add parameter `dst_size' to keep 1601 track of and update total size of stream. 1602 1603 (WRITE_SFNT_BUF, WRITE_SFNT_BUF_AT): Modify macros accordingly. 1604 1605 (pad4, store_loca, reconstruct_glyf, reconstruct_hmtx, 1606 reconstruct_font): Update parameters to accept `sfnt_size'. 1607 1608 (woff2_open_font): Add variable `sfnt_size'. Use WOFF2 header field 1609 `totalSfntSize' as initial reference (if value makes sense) and 1610 allocate `totalSfntSize' bytes for the sfnt stream. `write_buf' 1611 handles reallocation if and when required. Also resize the stream 1612 to `actual_sfnt_size' after reconstruction. 1613 16142019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1615 1616 [woff2] Reconstruct `loca', `hmtx', and swap out stream. 1617 1618 Add necessary functions to reconstruct loca and hmtx tables (the two 1619 remaining tables that can have a transform). `woff2_open_font' is 1620 now capable of loading a woff2 font face. This code may still need 1621 more refining and better memory management. 1622 1623 * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec): Add total 1624 (final) size of sfnt stream. 1625 1626 (WOFF2_InfoRec): Add header checksum value. 1627 1628 * src/sfnt/sfobjs.c (sfnt_open_font): Change `face_instance_index' 1629 parameter to its pointer so its value can be modified by 1630 `woff2_open_font'. 1631 1632 * src/sfnt/sfwoff2.c: (WRITE_SFNT_BUF_AT): New macro to write into 1633 sfnt buffer at given position. 1634 1635 (write_buf): Add parameter `extend_buf' which allows caller to 1636 specify whether buffer should be reallocated before copying data. 1637 1638 (WRITE_SFNT_BUF): Updated. 1639 1640 (pad4, store_loca, reconstruct_htmx): New functions. 1641 1642 (reconstruct_glyf): Calculate loca values and store them. 1643 1644 (reconstruct_font): Call `reconstruct_hmtx', write table record 1645 entries, and calculate table checksums. Also calculate font 1646 checksum and update `checksumAdjustment' entry in head table. 1647 1648 (woff2_open_font): Open stream for sfnt buffer, swap out input 1649 stream and return. 1650 1651 * src/sfnt/sfwoff2.h (woff2_open_font): Modify parameter to accept 1652 pointer to `face_index'. 1653 16542019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1655 1656 [woff2] Reconstruct transformed `glyf' table. 1657 1658 Reconstruct `glyf' table if it is transformed in the uncompressed 1659 table stream. Also add necessary structures, macros and functions. 1660 1661 * include/freetype/internal/wofftypes.h (WOFF2_InfoRec, 1662 WOFF2_SubstreamRec, WOFF2_PointRec): New structures. 1663 (WOFF2_TableRec): s/OrigLength/dst_length/. 1664 1665 * src/sfnt/sfwoff2.c (READ_255USHORT, READ_BASE128): Use 1666 `FT_SET_ERROR' to set implicit `error' variable. 1667 1668 (WRITE_SHORT): New macro. 1669 1670 (N_CONTOUR_STREAM, N_POINTS_STREAM, FLAG_STREAM, GLYPH_STREAM, 1671 COMPOSITE_STREAM, BBOX_STREAM, INSTRUCTION_STREAM): New macros to 1672 refer to substreams of the transformed `glyf' tables. 1673 1674 (Read255UShort, ReadBase128): Return errors set by `FT_READ_XXX' 1675 macros. 1676 1677 (with_sign, safe_int_addition): New functions to add sign to values 1678 based on a flag and perform safe addition respectively. 1679 1680 (triplet_decode): Decode variable-length (flag, xCoordinate, 1681 yCoordinate) triplet for a simple glyph. See 1682 1683 https://www.w3.org/TR/WOFF2/#triplet_decoding 1684 1685 (store_points, compute_bbox, composteGlyph_size, reconstruct_glyf): 1686 New functions. 1687 1688 (reconstruct_font): Call `reconstruct_glyf'. 1689 1690 * src/sfnt/sfwoff2.h: Add required constants. 1691 1692 * src/sfnt/woff2tags.h: Move out constants to `sfwoff2.h'. 1693 16942019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1695 1696 [woff2] Copy un-transformed tables to sfnt stream. 1697 1698 Copy un-transformed tables to the sfnt stream. 1699 1700 * src/sfnt/sfwoff2.c: (WRITE_SFNT_BUF): New macro. 1701 (write_buf): New function. Extend memory of `dst' buffer and copy 1702 bytes from `src'. 1703 (compute_ULong_sum): New function. Calculate checksum of table. 1704 (reconstruct_font): Change `FT_Byte* sfnt' to `FT_Byte** 1705 sfnt_bytes'. This has been done because we reallocate memory to 1706 `sfnt' multiple times, which may change the pointer value of `sfnt'. 1707 This new pointer must be propogated back to the caller. Same reason 1708 for using a double pointer in `write_buf'. 1709 1710 * src/sfnt/woff2tags.h (WOFF2_DEFAULT_MAX_SIZE): New macro used for 1711 overflow checking. 1712 17132019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1714 1715 [woff2] Create stream for uncompressed buffer. 1716 1717 Uncompressed buffer is now an `FT_Stream'. 1718 1719 Perform basic checks and start iterating over tables. 1720 1721 * src/sfnt/sfwoff2.c (stream_close, find_table, read_num_hmetrics): 1722 New functions. 1723 (reconstruct_font): Modify parameters and iterate over tables. 1724 (woff2_open_font): Updated. 1725 17262019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1727 1728 [woff2] Handle TTCs and start reconstructing font. 1729 1730 We `handle' TTCs by modifying the `indices' array to point to only 1731 those tables that are part of the requested `face_index'. 1732 1733 Set and use `num_tables' in `WOFF2_TtcFont'. 1734 1735 * src/sfnt/sfwoff2.c (reconstruct_font): New function. 1736 (woff2_open_font): Start reconstruction of font. 1737 17382019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1739 1740 [woff2] Get known tags from function. 1741 1742 Change `KnownTags' to a function (`woff2_known_tags'). This avoids 1743 introducing a global constant array. This function returns the 1744 specified index without *any* checks. The caller must ensure that 1745 `index' is within array limits. 1746 1747 * src/sfnt/sfwoff2.c (woff2_open_font): Change `KnownTags[...]' 1748 notation to `woff2_known_tags( ... )'. 1749 1750 * src/sfnt/woff2tags.c: Perform changes. 1751 1752 * src/sfnt/woff2tags.h: Update definitions. 1753 17542019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1755 1756 [woff2] Minor. 1757 1758 * src/sfnt/sfwoff2.c (woff2_uncompress): Add error message 1759 (woff2_open_font): Free `uncompressed_buf'. 1760 17612019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1762 1763 [woff2] Uncompress Brotli streams and `face_index' support. 1764 1765 WOFF2 compressed stream is now uncompressed if Brotli is available. 1766 This data is stored in a separate buffer (uncompressed_buf) because 1767 it does not contain direct table data. Certain tables have 1768 transformations applied to them, and they must be reconstructed 1769 before we can write those tables to the SFNT stream. 1770 1771 `face_index' is now being passed as a parameter to 1772 `woff2_open_font'. 1773 1774 * src/sfnt/sfobjs.c (sfnt_open_font): Add parameter 1775 `face_instance_index'. 1776 1777 * src/sfnt/sfwoff2.c (woff2_uncompress): New function. 1778 (woff2_open_font): Call `woff2_uncompress'. 1779 (compute_first_table_offset): Fix return type. 1780 1781 * src/sfnt/sfwoff2.h (woff2_open_font): Modify declaration. 1782 17832019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1784 1785 * builds/unix/configure.raw: Change argument name to `brotli'. 1786 17872019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1788 1789 Add Brotli dependency and required checks. 1790 1791 Brotli is required for decompressing WOFF2 font directory streams. 1792 The library is thus being added as an optional dependency for 1793 FreeType. 1794 1795 * builds/unix/configure.raw: Add checks for `libbrotlidec'. 1796 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBSSTATIC_CONFIG): Updated. 1797 1798 * devel/ftoption.h, include/freetype/config/ftoption.h 1799 (FT_CONFIG_OPTION_USE_BROTLI): New macro. 1800 18012019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1802 1803 [woff2] Write SFNT Offset table. 1804 1805 * src/sfnt/sfwoff2.c (WRITE_USHORT, WRITE_ULONG): New macros. 1806 (compare_tags): New function. 1807 (woff2_open_font): Implement it. 1808 18092019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1810 1811 * src/sfnt/sfwoff2.c: #undef macros. 1812 18132019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1814 1815 [woff2] Read table and collection directory. 1816 1817 * include/freetype/internal/wofftypes.h (WOFF2_TtcFontRec): New 1818 structure. 1819 (WOFF2_HeaderRec): Add more fields. 1820 1821 * src/sfnt/sfwoff2.c (READ_255USHORT, READ_BASE128, ROUND4): New 1822 macros. 1823 (Read255UShort, CollectionHeaderSize, compute_first_table_offset): 1824 New functions. 1825 (ReadBase128): Use `FT_READ_BYTE'. 1826 (woff2_open_font): Add functionality to read table directory and 1827 collection directory (if present). 1828 18292019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1830 1831 [sfnt] Include `woff2tags.c' for building. 1832 1833 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `woff2tags.c'. 1834 1835 * src/sfnt/sfnt.c: Include `woff2tags.c'. 1836 18372019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1838 1839 [sfnt] Add WOFF2 constants. 1840 1841 Add constants required for WOFF2, and known table tags as defined in 1842 the specification. See 1843 1844 https://www.w3.org/TR/WOFF2/#table_dir_format 1845 1846 for details. 1847 1848 * src/sfnt/woff2tags.c, src/sfnt/woff2tags.h: New files. 1849 18502019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1851 1852 [sfnt] Read WOFF 2 header. 1853 1854 Check for WOFF2 tag, call `woff2_open_font', and implement it to read 1855 header according to specification. 1856 1857 * include/freetype/internal/fttrace.h: Add `sfwoff2.c'. 1858 1859 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `sfwoff2.c'. 1860 1861 * src/sfnt/sfnt.c: Include `sfwoff2.c'. 1862 1863 * src/sfnt/sfobjs.c (sfnt_open_font): Check for `wOF2' tag and call 1864 `woff2_open_font'. 1865 1866 * src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h: New files. 1867 18682019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 1869 1870 Add structures for WOFF2. 1871 1872 Add structures and macro for WOFF 2 header and table directory. 1873 1874 * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec, 1875 WOFF2_TableRec_): New structures. 1876 1877 * include/freetype/tttags.h (TTAG_wOF2): New macro. 1878 18792019-08-26 Werner Lemberg <wl@gnu.org> 1880 1881 * src/psaux/cffdecode.c (cff_operator_seac): Fix numeric overflow. 1882 1883 Reported as 1884 1885 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16470 1886 18872019-08-26 Werner Lemberg <wl@gnu.org> 1888 1889 [type1] Fix `FT_Get_Var_Axis_Flags' (#56804). 1890 1891 * src/type1/t1load.c (T1_Get_MM_Var): Allocate space for axis flags. 1892 Also remove redundant assignment. 1893 18942019-07-24 Alexei Podtelezhnikov <apodtele@gmail.com> 1895 1896 * src/base/ftbbox.c (cubic_peak): Sanitize left shift (#56586). 1897 18982019-07-22 Weiyi Wu <w1w2y3@gmail.com> 1899 1900 * src/cid/cidload.c (cid_hex_to_binary): Fix typo (#56653). 1901 19022019-07-12 Werner Lemberg <wl@gnu.org> 1903 1904 [sfnt, winfonts] Avoid memory leaks in case of error (#56587). 1905 1906 * src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case 1907 of error. 1908 1909 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto. 1910 19112019-07-12 Ben Wagner <bungeman@google.com> 1912 1913 Properly handle phantom points for variation fonts (#56601). 1914 1915 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Scale phantom 1916 points if HVAR and/or VVAR is present. 1917 19182019-07-04 Werner Lemberg <wl@gnu.org> 1919 1920 [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580). 1921 1922 The same as previous commit but for the old engine. 1923 1924 * src/psaux/t1decode.c (t1operator_seac): Implement it. 1925 19262019-07-04 Chris Liddell <chris.liddell@artifex.com> 1927 1928 [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580). 1929 1930 As originally intended, a Type 1 SEAC charstring would be used for 1931 an accented glyph (like `acaron' or `uumlaut'), where the advance 1932 width of the SEAC glyph is the same as that of the `base' glyph 1933 (like `a' or `u'). In this case it is not uncommon for the SEAC 1934 glyph to not use an (H)SBW opcode of its own but to rely on the 1935 value from the base glyph. 1936 1937 However, out-of-spec fonts also use SEAC glyphs for ligatures (like 1938 `oe' or `fi'), and in those cases the overall advance width is 1939 greater than that of the `base' glyph. For this reason we have to 1940 allow that the SEAC glyph can have an (H)SBW value of its own, and 1941 if it has, retain this value, rather than the one from the base 1942 glyph. 1943 1944 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSEAC>: 1945 Implement it. 1946 19472019-07-01 Werner Lemberg <wl@gnu.org> 1948 1949 * Version 2.10.1 released. 1950 ========================== 1951 1952 1953 Tag sources with `VER-2-10-1'. 1954 1955 * docs/VERSION.TXT: Add entry for version 2.10.1. 1956 1957 * README, Jamfile (RefDoc), src/base/ftver.rc, 1958 builds/windows/vc2010/freetype.vcxproj, 1959 builds/windows/vc2010/index.html, 1960 builds/windows/visualc/freetype.dsp, 1961 builds/windows/visualc/freetype.vcproj, 1962 builds/windows/visualc/index.html, 1963 builds/windows/visualce/freetype.dsp, 1964 builds/windows/visualce/freetype.vcproj, 1965 builds/windows/visualce/index.html, 1966 builds/wince/vc2005-ce/freetype.vcproj, 1967 builds/wince/vc2005-ce/index.html, 1968 builds/wince/vc2008-ce/freetype.vcproj, 1969 builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/. 1970 1971 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. 1972 1973 * builds/unix/configure.raw (version_info): Set to 23:1:17. 1974 * CMakeLists.txt (VERSION_PATCH): Set to 1. 1975 1976 * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation. 1977 19782019-06-26 Alexei Podtelezhnikov <apodtele@gmail.com> 1979 1980 * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality. 1981 1982 Reported by Armin Hasitzka. 1983 19842019-06-16 Werner Lemberg <wl@gnu.org> 1985 1986 * src/tools/apinames.c: Formatting, minor edits. 1987 19882019-06-16 Werner Lemberg <wl@gnu.org> 1989 1990 [autofit] Disable hinting if no blue zones are available (#56450). 1991 1992 * src/autofit/afglobal.c (af_face_global_get_metrics): Start again 1993 (with dummy hinter module) if no blue zones are present. 1994 1995 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change 1996 signature to return error code. 1997 If no blue zones are found, update `glyph_styles' array to hold 1998 AF_STYLE_NONE_DFLT instead of the current style. 1999 (af_latin_metrics_init): Return internal error code if no blue zones 2000 are found. 2001 20022019-06-16 Werner Lemberg <wl@gnu.org> 2003 2004 Towards better VMS support. 2005 2006 More to come. 2007 2008 * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64, 2009 builds/vms/vmslib.dat: New files provided by Jouk Jansen 2010 <joukj@hrem.nano.tudelft.nl>. 2011 2012 * builds/vms/ftconfig.h: Update, also from Jouk. 2013 20142019-06-13 Werner Lemberg <wl@gnu.org> 2015 2016 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor. 2017 20182019-06-13 Alexei Podtelezhnikov <apodtele@gmail.com> 2019 2020 [smooth] Restore the span buffering for direct mode only. 2021 2022 The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be 2023 enough to cover the entire scanline for simple glyphs in most cases: 2024 each slightly slanted edge needs up to two spans, plus a filling span 2025 in-between. This is not new, we used to do it before cb4388783cecc. 2026 2027 * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'. 2028 (gray_hline, gray_sweep): Implement the span buffering. 2029 (gray_raster_render): Use negative `num_spans' to avoid the direct 2030 mode. 2031 20322019-06-12 Alexei Podtelezhnikov <apodtele@gmail.com> 2033 2034 * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error. 2035 2036 Fix a warning by adding a return value as in `TT_RunIns', 2037 which should not be a compatibility issue. 2038 20392019-06-11 Alexei Podtelezhnikov <apodtele@gmail.com> 2040 2041 * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'. 2042 20432019-06-11 Moazin Khatti <moazinkhatri@gmail.com> 2044 2045 [gzip] Add support for `gzip' encoded header. 2046 2047 * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to 2048 `inflateInit2' to enable support for `gzip' encoded headers. 2049 20502019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com> 2051 2052 [type1,type42] Use `const' for string literals. 2053 2054 * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated. 2055 * include/freetype/internal/t1types.h (T1_EncodingRec): Updated. 2056 * src/psaux/psobjs.[ch] (ps_table_add): Updated. 2057 * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated. 2058 * src/type42/t42objs.c (T42_Open_Face): Updated. 2059 * src/type42/t42parse.c (t42_parse_encoding): Updated. 2060 2061 * src/cff/cffobjs.c (cff_face_init): Minor. 2062 20632019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com> 2064 2065 [bdf,pcf] Use `const' for string literals. 2066 2067 * src/bdf/bdf.h (bdf_property_t): Updated `name'. 2068 * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property, 2069 _bdf_add_property,_bdf_ato*): Updated. 2070 * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated. 2071 * src/pcf/pcfread.c (pcf_intrpret_style): Ditto. 2072 20732019-06-07 Philip Race <philip.race@oracle.com> 2074 2075 * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash. 2076 2077 Terminate loop at end of environment. 2078 20792019-05-31 Alexei Podtelezhnikov <apodtele@gmail.com> 2080 2081 Solidify VC2005 builds. 2082 2083 * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly 2084 declare `_BitScanReverse' intrinsic. 2085 * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics. 2086 20872019-05-30 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 2088 2089 [sfnt] Separate WOFF sources and headers. 2090 2091 Move WOFF sources and headers to separate files. 2092 2093 * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c, 2094 src/sfnt/sfwoff.h: New files. 2095 2096 * include/freetype/internal/fttrace.h: Register `sfwoff.c'. 2097 2098 * include/freetype/internal/internal.h: Define 2099 FT_INTERNAL_WOFF_TYPES_H. 2100 2101 * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H. 2102 2103 * include/freetype/internal/tttypes.h: Move out WOFF structures. 2104 2105 * src/sfnt/rules.mk: Add `sfwoff.c'. 2106 2107 * src/sfnt/sfnt.c: Include `sfwoff.c'. 2108 2109 * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources. 2110 21112019-05-30 Werner Lemberg <wl@gnu.org> 2112 2113 [base] Fix `make multi'. 2114 2115 Reported by Nikhil. 2116 2117 * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H. 2118 21192019-05-29 Ben Wagner <bungeman@google.com> 2120 2121 [truetype] Fix copy-and-paste error (#56409). 2122 2123 * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices 2124 into `unrounded' array for phantom points. 2125 21262019-05-29 Werner Lemberg <wl@gnu.org> 2127 2128 [truetype] Fix 32bit builds (#56404). 2129 2130 Patch suggested by Ben Wagner <bungeman@google.com>. 2131 2132 * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove 2133 harmful cast to unsigned type. 2134 21352019-05-26 Ben Wagner <bungeman@google.com> 2136 2137 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy. 2138 21392019-05-23 Werner Lemberg <wl@gnu.org> 2140 2141 [truetype] Draw glyphs without deltas in variation font (#56374). 2142 2143 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill 2144 `unrounded' array. 2145 21462019-05-21 Werner Lemberg <wl@gnu.org> 2147 2148 * src/truetype/ttinterp.c (opcode_name): Improve mnemonics. 2149 21502019-05-16 Werner Lemberg <wl@gnu.org> 2151 2152 [truetype] Actually scale varied CVT values. 2153 2154 Up to now, only the unscaled CVT values were varied; in other words, 2155 the `CVAR' data was never used for bytecode hinting. 2156 2157 * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary 2158 function. 2159 (tt_face_vary_cvt): Use it to trigger rescaling of CVT values. 2160 21612019-05-16 Werner Lemberg <wl@gnu.org> 2162 2163 [truetype] Use 26.6 format for storing unscaled CVT values. 2164 2165 If `CVAR' data is applied to variation fonts, fractional values are 2166 possible. 2167 2168 * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of 2169 `cvt' from `FT_Short' to `FT_Int32'. 2170 2171 * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro. 2172 (tt_face_vary_cvt): Use it to update code to 26.6 format. 2173 2174 * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6 2175 format. 2176 2177 * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6 2178 format. 2179 21802019-05-16 Werner Lemberg <wl@gnu.org> 2181 2182 * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'. 2183 2184 This fixes linear advance width values for spacing glyphs. Bug 2185 introduced 2019-05-09. 2186 21872019-05-16 Werner Lemberg <wl@gnu.org> 2188 2189 [truetype] Avoid code duplication. 2190 2191 * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this 2192 function. 2193 (tt_size_ready_bytecode): Updated. 2194 * src/truetype/ttgload.c (tt_loader_init): Updated. 2195 21962019-05-13 Jouk Jansen <joukj@hrem.nano.tudelft.nl> 2197 2198 * vms_make.com: Updated. Handle `bzip2' directory, too. 2199 22002019-05-13 Werner Lemberg <wl@gnu.org> 2201 2202 * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning. 2203 22042019-05-12 Werner Lemberg <wl@gnu.org> 2205 2206 [truetype] Doh. Fix last commit to make it work. 2207 2208 Very embarassing :-) 2209 2210 Reported as 2211 2212 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701 2213 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705 2214 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710 2215 2216 * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add 2217 argument; update all callers. 2218 (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active 2219 for variation fonts only, thus also enclose related code with 2220 `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where 2221 necessary. 2222 Revert commit a113e5d from 2019-05-09, and don't use `extra_points2' 2223 but allocate a temporary array. 2224 Speed up the scaling of the `unrounded' array. 2225 2226 * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type 2227 conversions and rounding. The unsigned type must have more or equal 2228 bits to the signed type. 2229 22302019-05-09 Werner Lemberg <wl@gnu.org> 2231 2232 [truetype] Increase precision of font variation (#54371). 2233 2234 This patch makes FreeType use font units in 26.6 format internally 2235 instead of integers. 2236 2237 * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro. 2238 (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font 2239 coordinates. 2240 * src/truetype/ttgxvar.h: Updated. 2241 2242 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use 2243 `extra_points2' array to temporarily hold unrounded point 2244 coordinates; use them to compute scaled coordinates and linear 2245 advance width and height. 2246 (load_truetype_code): Adjust similarly. 2247 22482019-05-09 Werner Lemberg <wl@gnu.org> 2249 2250 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor. 2251 22522019-05-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2253 2254 [smooth] Faster fractions. 2255 2256 * src/smooth/ftgrays.c (SUBPIXELS): Replace with... 2257 (FRACT): A fractional coordinate macro to use in... 2258 (gray_render_line, gray_render_scanline): ... here. 2259 22602019-05-07 Alexei Podtelezhnikov <apodtele@gmail.com> 2261 2262 * src/raster/ftraster.c (Draw_Sweep): Unbreak. 2263 22642019-05-05 Alexei Podtelezhnikov <apodtele@gmail.com> 2265 2266 * src/raster/ftraster.c: Clean-ups. 2267 22682019-05-05 Werner Lemberg <wl@gnu.org> 2269 2270 * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'. 2271 22722019-05-04 Alexei Podtelezhnikov <apodtele@gmail.com> 2273 2274 * src/smooth/ftgrays.c (gray_render_line): Small shortcut. 2275 22762019-05-04 Werner Lemberg <wl@gnu.org> 2277 2278 Various clang 8.0 static analyzer fixes. 2279 2280 Reported by Sender Ghost <lightside@gmx.com>. 2281 2282 * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner 2283 case where `edge->first' could be NULL. 2284 2285 * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of 2286 `size'. 2287 2288 * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where 2289 `draw_right' might be NULL. 2290 2291 * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for 2292 `aadvance'. 2293 Ensure `abearing' always hold a meaningful result. 2294 2295 * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is 2296 not NULL before accessing it. 2297 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary 2298 test of `namedstyle'. 2299 2300 * src/type42/t42parse.c (t42_parser_done): Ensure 2301 `parser->root.funcs.done' is not NULL before accessing it. 2302 23032019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com> 2304 2305 Miscellaneous macro updates. 2306 2307 * src/base/ftoutln.c (SCALED): Updated. 2308 * src/smooth/ftgrays.c (SCALED): Ditto. 2309 (FLOOR, ROUND, CEILING): Removed. 2310 * src/psaux/psfixed.h (cf2_fracToFixed): Updated. 2311 23122019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com> 2313 2314 Tweak LCD filtering. 2315 2316 * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): 2317 Choose direction from bitmap's pixel_mode. 2318 * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc): 2319 Updated. 2320 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated. 2321 23222019-05-02 Werner Lemberg <wl@gnu.org> 2323 2324 * vms_make.com: Updated (#56253). 2325 2326 Remove no longer existing directories (`autohint', `otlayout'). 2327 Update used base extensions. 2328 Activate `autofit' module. 2329 Add `gxvalid' module. 2330 Update copyright notices. 2331 23322019-04-29 Alexei Podtelezhnikov <apodtele@gmail.com> 2333 2334 [smooth] Simplify cubic Bézier flattening. 2335 2336 The previous implementation is correct but it is too complex. 2337 The revised algorithm is based on the fact that each split moves 2338 the control points closer to the trisection points on the chord. 2339 The corresponding distances are good surrogates for the curve 2340 deviation from the straight line. 2341 2342 This cubic flattening algorithm is somewhat similar to the conic 2343 algorithm based the distance from the control point to the middle of 2344 the chord. The cubic distances, however, decrease less predictably 2345 but are easy enough to calculate on each step. 2346 2347 The new algorithm produces slightly larger number of splits, which is 2348 compensated by its simplicity. The overall rendering performance is 2349 improved by 1-2%. The larger number of splits does not necessarily 2350 result in higher quality, which stays comparable. 2351 2352 * src/smooth/ftgrays.c (gray_render_cubic): Replace the split 2353 condition. 2354 23552019-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> 2356 2357 [smooth] Bithacks and cosmetics. 2358 2359 * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline, 2360 gray_render_conic, gray_convert_glyph_inner): Updated. 2361 23622019-04-25 Alexei Podtelezhnikov <apodtele@gmail.com> 2363 2364 Optimize Bézier bisections. 2365 2366 This change makes bisections faster by 20-30%. When inlined into 2367 `gray_render_cubic', this makes the function faster by 10% and is 2368 noticeable in the overall rendering performance. 2369 2370 * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and 2371 refactor. 2372 * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto. 2373 * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto. 2374 * src/base/ftbbox.c (cubic_peak): Use shifts. 2375 23762019-04-23 Werner Lemberg <wl@gnu.org> 2377 2378 * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code. 2379 2380 Found by clang 8.0's static analyzer and reported by Sender Ghost 2381 <lightside@gmx.com>. 2382 23832019-04-23 Werner Lemberg <wl@gnu.org> 2384 2385 [base] Fix thinko in previous commit. 2386 2387 * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not 2388 target pitch. 2389 2390 Problem reported by Sender Ghost <lightside@gmx.com>. 2391 23922019-04-22 Werner Lemberg <wl@gnu.org> 2393 2394 * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch. 2395 2396 Problem reported by Sender Ghost <lightside@gmx.com>. 2397 23982019-04-22 Werner Lemberg <wl@gnu.org> 2399 2400 Fix return value of `FT_Set_Named_Instance' (#56186). 2401 2402 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle 2403 internal return value -1 of `TT_Set_Var_Design'. 2404 24052019-04-18 Werner Lemberg <wl@gnu.org> 2406 2407 [pcf] Fix handling of undefined glyph (#56067). 2408 2409 This commit fixes the changes from 2018-07-21, which broke charmap 2410 iteration. We now add the default character as a new glyph with 2411 index 0, thus increasing the number of glyphs by one (as before). 2412 2413 * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial 2414 glyph with index 0. 2415 Limit number of elements to 65534. 2416 (pcf_get_bitmaps): Ditto. 2417 Unify two loops into one; this avoids allocation of an intermediate 2418 array. 2419 (pcf_get_encodings): Don't flip indices but copy glyph metrics of 2420 default character to index 0. 2421 Also handle invalid default character. 2422 2423 * docs/CHANGES: Updated. 2424 24252019-04-15 Minmin Gong <gongminmin@msn.com> 2426 2427 * CMakeLists.txt: Avoid rewriting of unchanged configuration files. 2428 2429 Reported as 2430 2431 https://savannah.nongnu.org/patch/index.php?9755 2432 24332019-04-15 JDG <JonathanG@iQmetrix.com> 2434 2435 * src/tools/apinames.c (main): Fix error message. 2436 2437 Reported as 2438 2439 https://savannah.nongnu.org/patch/?9796 2440 24412019-04-11 Alexei Podtelezhnikov <apodtele@gmail.com> 2442 2443 [smooth] Fix segfault in direct mode (#56092). 2444 2445 * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for 2446 direct mode. 2447 * src/smooth/ftgrays.c (gray_raster_render): Use it. 2448 24492019-04-06 Werner Lemberg <wl@gnu.org> 2450 2451 * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061). 2452 2453 This is for Visual Studio 2019 on ARM. 2454 24552019-04-06 Werner Lemberg <wl@gnu.org> 2456 2457 For distribution, replace `.tar.bz2' with `.tar.xz' bundles. 2458 2459 * builds/toplevel.mk (build): Do it. 2460 2461 * README, docs/CHANGES, docs/release: Updated. 2462 24632019-04-06 Antony Lee <anntzer.lee@gmail.com> 2464 2465 Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'. 2466 2467 * include/freetype/freetype.h (FT_Get_Name_Index), 2468 include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc), 2469 include/freetype/internal/services/svgldict.h 2470 (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index), 2471 src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c 2472 (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index), 2473 src/type42/t42drivr.c (t42_get_name_index): Add `const' to second 2474 argument. 2475 24762019-03-31 Armin Hasitzka <prince.cherusker@gmail.com> 2477 2478 [cff] Fix boundary checks. 2479 2480 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically 2481 allocated memory when parsing CFF files with the "old" engine. Bounds 2482 checks have never been updated, however, leading to pointless 2483 comparisons of pointers in some cases. This commit presents a 2484 solution for bounds checks in the CFF module with an extended logic 2485 for the "old" engine while staying as concise as possible for the 2486 "new" one. 2487 2488 * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and 2489 the additional field `t2_strings' within `CFF_ParserRec'. 2490 2491 * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary 2492 checks into this new function and update the rest of `cffparse.c' to 2493 use it. 2494 2495 Reported as 2496 2497 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137 2498 24992019-03-20 Werner Lemberg <wl@gnu.org> 2500 2501 [autofit] Fix Mongolian blue zone characters. 2502 2503 * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters 2504 to get medial forms for some Mongolian characters. 2505 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2506 25072019-03-19 Werner Lemberg <wl@gnu.org> 2508 2509 [autofit] Add support for Mongolian script. 2510 2511 As a de-facto standard, layouts using this script are constructed 2512 horizontally line by line, then the lines are rotated clockwise for 2513 vertical display. 2514 2515 * src/autofit/afblue.dat: Add blue zone data for Mongolian. 2516 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2517 2518 * src/autofit/afscript.h: Add Mongolian standard characters. 2519 2520 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian 2521 data. 2522 25232019-03-15 Werner Lemberg <wl@gnu.org> 2524 2525 * Version 2.10.0 released. 2526 ========================== 2527 2528 2529 Tag sources with `VER-2-10-0'. 2530 2531 * docs/VERSION.TXT: Add entry for version 2.10.0. 2532 * docs/CHANGES: Updated. 2533 2534 * README, Jamfile (RefDoc), src/base/ftver.rc, 2535 builds/windows/vc2010/freetype.vcxproj, 2536 builds/windows/vc2010/index.html, 2537 builds/windows/visualc/freetype.dsp, 2538 builds/windows/visualc/freetype.vcproj, 2539 builds/windows/visualc/index.html, 2540 builds/windows/visualce/freetype.dsp, 2541 builds/windows/visualce/freetype.vcproj, 2542 builds/windows/visualce/index.html, 2543 builds/wince/vc2005-ce/freetype.vcproj, 2544 builds/wince/vc2005-ce/index.html, 2545 builds/wince/vc2008-ce/freetype.vcproj, 2546 builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/. 2547 2548 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10. 2549 (FREETYPE_PATCH): Set to 0. 2550 2551 * builds/unix/configure.raw (version_info): Set to 23:0:17. 2552 * CMakeLists.txt (VERSION_MINOR): Set to 10. 2553 (VERSION_PATCH): Set to 0. 2554 2555 * builds/toplevel.mk (version, winversion): Since the minor version 2556 number has two digits now, never omit the patch number. We would 2557 get ambiguous zip file names otherwise. 2558 (dist): Remove remnants of `docmaker' tool. 2559 (do-dist): Remove unused intermediate files. 2560 2561 * src/cff/cffparse.c (destrict_c2s_item): Guard function with 2562 CFF_CONFIG_OPTION_OLD_ENGINE macro. 2563 25642019-03-07 Andrei Alexeyev <0x416b617269@gmail.com> 2565 Werner Lemberg <wl@gnu.org> 2566 2567 Fix invalid function pointer casts. 2568 2569 This change should allow Freetype to work on WASM/Emscripten without 2570 needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'. 2571 2572 * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature. 2573 2574 * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array, 2575 parse_expansion_factor, parse_font_name): Return `void', not 2576 `FT_Error'. 2577 2578 * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc): 2579 Fix signature. 2580 25812019-03-05 Werner Lemberg <wl@gnu.org> 2582 2583 [base] Handle numeric overflow (#55827). 2584 2585 * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'. 2586 25872019-03-05 Sebastian Rasmussen <sebras@gmail.com> 2588 2589 [psaux] Fix use of uninitialized memory (#55832). 2590 2591 * src/psaux/psintrp.c (cf2_interpT2CharString): The call to 2592 `cf2_arrstack_setCount' may fail because the allocator ran out of 2593 memory. When this happens the stack is still written to before the 2594 error condition is checked. This means that FreeType writes outside 2595 of allocated memory. This commit moves the error check prior to the 2596 stack assignment, hence the function now properly returns with an 2597 error condition. 2598 25992019-02-23 Werner Lemberg <wl@gnu.org> 2600 2601 * src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets. 2602 2603 The function only provided a framework without an actual 2604 implementation, which this commit removes. 2605 26062019-02-23 Werner Lemberg <wl@gnu.org> 2607 2608 * src/tools/update-copyright-year: Insert `(C)'. 2609 26102019-02-21 Armin Hasitzka <prince.cherusker@gmail.com> 2611 2612 [truetype] Mask numeric overflows. 2613 2614 * src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP): 2615 Mask numeric overflows. 2616 2617 Reported as 2618 2619 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681 2620 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734 2621 26222019-02-21 Armin Hasitzka <prince.cherusker@gmail.com> 2623 2624 [psaux] Mask numeric overflow. 2625 2626 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric 2627 overflow. 2628 2629 Reported as 2630 2631 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041 2632 26332019-02-16 Wink Saville <wink@saville.com> 2634 2635 * src/autofit/afwarp.h (af_warper_compute): Fix declaration. 2636 26372019-02-02 Nikolaus Waxweiler <madigens@gmail.com> 2638 2639 [truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics. 2640 2641 Instead of setting typo or win metrics as the new `FT_Face' metrics 2642 indiscriminately, apply only typo deltas to the currently active 2643 `FT_Face' metrics. This prevents line height differences when the 2644 default outlines were used as the regular face and instances for 2645 everything else, for example. 2646 2647 * src/truetype/ttgxvar.c (tt_apply_mvar): Implement. 2648 26492019-02-02 Nikolaus Waxweiler <madigens@gmail.com> 2650 2651 [sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set. 2652 2653 If the `OS/2' table exists and `fsSelection' bit 7 2654 (USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute 2655 the `FT_Face's ascender, descender, and height. Otherwise, fall 2656 back to old behavior. 2657 2658 * src/sfnt/sfobjs.c (sfnt_load_face): Implement. 2659 26602019-01-18 John Tytgat <John.Tytgat@esko.com> 2661 2662 [sfnt] Handle TT fonts having two PostScript font names (#55471). 2663 2664 * src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any 2665 other language found for PostScript font names. 2666 26672019-01-08 Chris Liddell <chris.liddell@artifex.com> 2668 2669 [psaux] Fix closepath (#55414). 2670 2671 All of the Type 1 path building is done with code common to the 2672 revised CFF engine, with the exception of closepath, which was still 2673 calling ps_builder_close_contour(), thus previously cached segments 2674 were not always written to the path, and glyph corruption, or even 2675 invalid outlines were possible. 2676 2677 * src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>: 2678 Switch to calling `cf2_glyphpath_closeOpenPath'. 2679 26802018-12-29 Werner Lemberg <wl@gnu.org> 2681 2682 * src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310). 2683 26842018-12-25 Werner Lemberg <wl@gnu.org> 2685 2686 * src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow. 2687 2688 Reported as 2689 2690 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915 2691 26922018-12-12 Werner Lemberg <wl@gnu.org> 2693 2694 [gxvalid] Fix compiler warnings. 2695 2696 * src/gxvalid/gxvjust.c (gxv_just_check_max_gid), 2697 src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'. 2698 26992018-12-11 Werner Lemberg <wl@gnu.org> 2700 2701 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test. 2702 2703 `control_len' only gets its value from `n_ins' (and vice versa), 2704 which is always read as `unsigned short' and thus can't be larger 2705 than 0xFFFF. 2706 27072018-12-04 Werner Lemberg <wl@gnu.org> 2708 2709 [bdf] Ignore data after `ENDFONT'. 2710 2711 Reported as 2712 2713 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798 2714 2715 * src/bdf/bdflib.c (_bdf_parse_end): New function. 2716 (_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has 2717 been encountered. 2718 27192018-12-02 Alexei Podtelezhnikov <apodtele@gmail.com> 2720 2721 * builds/windows/visualc/freetype.dsp: Dust off. 2722 27232018-11-27 Alexei Podtelezhnikov <apodtele@gmail.com> 2724 2725 * builds/windows/vc2010/freetype.vcxproj: Simplify. 2726 27272018-11-27 Chris Liddell <chris.liddell@artifex.com> 2728 2729 [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls. 2730 2731 For multiple master fonts, common usage (in Postscript) is to modify 2732 the WeightVector of an existing font instance, this addition 2733 supports that use. 2734 2735 * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector, 2736 FT_Get_MM_WeightVector): New API functions. 2737 2738 * include/freetype/internalservices/svmm.h 2739 (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New 2740 function types. 2741 (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector' 2742 members. 2743 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. 2744 2745 * src/cffcffdrivr.c (cff_set_mm_weightvector, 2746 cff_get_mm_weightvector): New functions. 2747 (cff_service_multi_masters): Register them. 2748 2749 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. 2750 This driver doesn't use the new interface. 2751 2752 * src/type1/t1load.c (T1_Set_MM_WeightVector, 2753 T1_Get_MM_WeightVector): New functions. 2754 * src/type1/t1driver.c (t1_service_multi_masters): Register them. 2755 * src/type1/t1load.h: Updated. 2756 27572018-11-27 Ben Wagner <bungeman@google.com> 2758 2759 [cff] Fix compiler warning (#55105). 2760 2761 * src/cff/cffparse.c (cff_parser_run): Guard label only used if 2762 CFF_CONFIG_OPTION_OLD_ENGINE is active. 2763 27642018-11-27 Ben Wagner <bungeman@google.com> 2765 2766 [truetype] Fix numeric overflow (#55103). 2767 2768 * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'. 2769 27702018-11-25 Alexei Podtelezhnikov <apodtele@gmail.com> 2771 2772 [builds] Belated DLL support with vc2002-vc2008. 2773 2774 The solution and project files should be automatically upgraded for 2775 the approriate Visual C++ version. 2776 2777 * builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades. 2778 * builds/windows/visualc/index.html: Document the change. 2779 * builds/windows/vc2005, builds/windows/vc2008: Removed as redundant. 2780 27812018-11-22 Armin Hasitzka <prince.cherusker@gmail.com> 2782 2783 * src/cff/cffparse.c: Please the compiler. 2784 27852018-11-22 Armin Hasitzka <prince.cherusker@gmail.com> 2786 2787 [cff] Fix memory overflow. 2788 2789 Reported as 2790 2791 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869 2792 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869 2793 2794 * src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store 2795 evaluated T2 charstrings in separately allocated memory. 2796 27972018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com> 2798 2799 * builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it. 2800 28012018-11-10 Alexei Podtelezhnikov <apodtele@gmail.com> 2802 2803 [smooth] Placeholder only for library-enabled LCD filtering. 2804 2805 * src/smooth/ftsmooth.c (ft_smooth_init): Add disabled 2806 `FT_Library_SetLcdFilter' call. 2807 28082018-11-09 Young Xiao <yangx92@hotmail.com> 2809 2810 [psaux] Add safety guard (#54985). 2811 2812 * src/psaux/psobjs.c (cff_builder_close_contour): Do it. 2813 28142018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2815 2816 * builds/unix/configure.raw: Require `windows.h' for windres. 2817 28182018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2819 2820 [ftstroke] Fix unpredictable failures (#54986). 2821 2822 * src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check. 2823 28242018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2825 2826 [ftstroke] Fix unpredictable failures (#54976). 2827 2828 * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags. 2829 28302018-11-07 Ben Wagner <bungeman@google.com> 2831 2832 [truetype] Fix VF check from 2018-09-12 (#54973). 2833 2834 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct 2835 offsets for estimates. 2836 28372018-11-06 Werner Lemberg <wl@gnu.org> 2838 2839 [pshinter] Fix numeric overflow. 2840 2841 Reported as 2842 2843 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242 2844 2845 * src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it. 2846 28472018-11-06 Werner Lemberg <wl@gnu.org> 2848 2849 [psaux] Fix timeout in old CFF engine. 2850 2851 Reported as 2852 2853 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260 2854 2855 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) 2856 <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless 2857 loop. 2858 28592018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com> 2860 2861 * src/truetype/ttgxvar.c: Use enum definitions. 2862 28632018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> 2864 2865 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition. 2866 28672018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> 2868 2869 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks. 2870 28712018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> 2872 2873 Revert due to specs: [truetype] Speed up variation IUP. 2874 28752018-11-02 Alexei Podtelezhnikov <apodtele@gmail.com> 2876 2877 * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic. 2878 2879 Reported and tested by Behdad. 2880 28812018-11-02 Shailesh Mistry <shailesh.mistry@hotmail.co.uk> 2882 2883 [autofit] Prevent SEGV. 2884 2885 See 2886 2887 https://bugs.ghostscript.com/show_bug.cgi?id=697545 2888 2889 for more details on how the bug was found. 2890 2891 * src/autofit/afloader.c (af_loader_load_glyph): Propagate error 2892 code. 2893 28942018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> 2895 2896 [truetype] Speed up variation IUP. 2897 2898 * src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial 2899 snapping to the same position from true interpolation. 2900 29012018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> 2902 2903 * src/type1/t1load.c (t1_set_mm_blend): Optimized. 2904 29052018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> 2906 2907 * src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized. 2908 29092018-10-29 Werner Lemberg <wl@gnu.org> 2910 2911 [base] Fix numeric overflow. 2912 2913 Reported as 2914 2915 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080 2916 2917 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'. 2918 29192018-10-29 Werner Lemberg <wl@gnu.org> 2920 2921 [cff] Fix numeric overflow. 2922 2923 Reported as 2924 2925 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988 2926 2927 * src/cff/cffparse.c (cff_parser_run) 2928 [CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'. 2929 29302018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com> 2931 2932 [sfnt] Make `head' timestamps unsigned. 2933 2934 It's been more than 2^31 seconds since 1904. 2935 2936 * include/freetype/tttables.h (TT_Header): Change field types. 2937 * src/sfnt/ttload.c (tt_face_load_generic_header): Updated. 2938 29392018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com> 2940 2941 Revert: Align FreeType with standard C memory management. 2942 29432018-10-27 Werner Lemberg <wl@gnu.org> 2944 2945 [psaux] Fix numeric overflow. 2946 2947 Triggered by 2948 2949 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157 2950 2951 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend> 2952 [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow. 2953 29542018-10-20 Werner Lemberg <wl@gnu.org> 2955 2956 Avoid endless loop while tracing (#54858). 2957 2958 * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with 2959 FT_DEBUG_LEVEL_TRACE. 2960 29612018-10-17 David Demelier <markand@malikania.fr> 2962 2963 * CMakeLists.txt: Specify `RUNTIME DESTINATION'. 2964 2965 This is needed for DLL builds. 2966 29672018-10-07 Werner Lemberg <wl@gnu.org> 2968 2969 A missing Unicode cmap is not a fatal error. 2970 2971 This is a follow-up to the previous commit. 2972 2973 * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c 2974 (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init), 2975 src/type42/t42objs.c (T42_Face_Init): Implement it. 2976 29772018-10-07 Werner Lemberg <wl@gnu.org> 2978 2979 Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794). 2980 2981 * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c 2982 (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init): 2983 Check `unicodes_init' field. 2984 29852018-10-03 Werner Lemberg <wl@gnu.org> 2986 2987 [ftgrays] Fix typo in stand-alone mode (#54771). 2988 2989 * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ && 2990 FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'. 2991 29922018-10-02 Werner Lemberg <wl@gnu.org> 2993 2994 [psaux] Fix segfault. 2995 2996 Reported as 2997 2998 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768 2999 3000 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) 3001 <cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check 3002 argument. 3003 30042018-10-02 Werner Lemberg <wl@gnu.org> 3005 3006 [psaux] Fix numeric overflow. 3007 3008 Reported as 3009 3010 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740 3011 3012 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll> 3013 [CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT. 3014 30152018-10-02 Werner Lemberg <wl@gnu.org> 3016 3017 [pshinter] Handle numeric overflow. 3018 3019 Reported as 3020 3021 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550 3022 3023 * src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric 3024 overflow. 3025 30262018-09-27 Alexei Podtelezhnikov <apodtele@gmail.com> 3027 3028 Align FreeType with standard C memory management. 3029 3030 * include/freetype/ftsystem.h: Include FT_TYPES_H. 3031 (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments. 3032 * src/raster/ftmisc.h: Ditto. 3033 3034 * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c, 3035 * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc): 3036 Use size_t for the size arguments. 3037 3038 * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use 3039 FT_Offset, aka size_t, for the size arguments. 3040 30412018-09-25 Werner Lemberg <wl@gnu.org> 3042 3043 Fix handling of `FT_Bool'. 3044 3045 Before this commit we had code like 3046 3047 (FT_Bool)( globals->glyph_styles[gindex] & 0x8000) 3048 3049 Since `FT_Bool' is defined to be an `unsigned char', the code 3050 evaluated to something like 3051 3052 (unsigned char)( 0x8532 & 0x8000) 3053 3054 which in turn expanded to 3055 3056 (unsigned char)( 0x8000) 3057 3058 and finally yielded 0x00 – i.e., false – not as expected. 3059 3060 Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>. 3061 3062 * include/freetype/fttypes.h (FT_BOOL): Add a comparison against 3063 zero so that we always have a Boolean expression. 3064 3065 */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where 3066 possible. 3067 30682018-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> 3069 3070 [bdf] Speed up charmap access. 3071 3072 This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster. 3073 3074 * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search 3075 with continuous prediction. 3076 30772018-09-22 Alexei Podtelezhnikov <apodtele@gmail.com> 3078 3079 * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak. 3080 3081 This one should be clearer. When the rounded monochrome bbox collapses 3082 we add a pixel that covers most if not all original cbox. 3083 30842018-09-21 Alexei Podtelezhnikov <apodtele@gmail.com> 3085 3086 * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak. 3087 30882018-09-21 Ben Wagner <bungeman@google.com> 3089 3090 Improve auto-hinter handling of bitmap fonts (#54681). 3091 3092 For bitmap fonts, `FT_Load_Glyph' should either return an error or 3093 not set the format to `FT_GLYPH_FORMAT_OUTLINE'. However, in this 3094 case `FT_Load_Glyph' calls into the auto-hinter which calls back 3095 into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which 3096 marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path 3097 (even though it doesn't have any path). It appears that the 3098 auto-hinter should not be called when the face doesn't have 3099 outlines. The current test for using the auto-hinter in 3100 `FT_Load_Glyph' checks whether the driver supports scalable 3101 outlines, but not if the face supports scalable outlines. 3102 3103 * src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have 3104 scalable outlines. 3105 31062018-09-21 Werner Lemberg <wl@gnu.org> 3107 3108 [raster] Fix disappearing vertical lines (#54589). 3109 3110 * src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case 3111 where both left and right outline exactly pass pixel centers. 3112 31132018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com> 3114 3115 * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak. 3116 3117 This adds pixels in case a contour goes through the center 3118 and they need to be turned on in the b/w rasterizer. 3119 31202018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com> 3121 3122 [pcf] Replace charmap implementation. 3123 3124 PCF comes with charmap lookup table, aka PCF encodings. Using it 3125 directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times 3126 faster than the original BDF-like binary searches. 3127 3128 * src/pcf/pcf.h (PCF_EncodingRec): Removed. 3129 (PCF_FaceRec): Remove `nencodings' and `encodings'. 3130 * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced. 3131 * src/pcf/pcfread.c (pcf_get_encodings): Store data differently. 3132 31332018-09-20 Werner Lemberg <wl@gnu.org> 3134 3135 [base] Remove unused function `FT_GlyphLoader_CopyPoints'. 3136 3137 * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c 3138 (FT_GlyphLoader_CopyPoints): Do it. 3139 31402018-09-19 Alexei Podtelezhnikov <apodtele@gmail.com> 3141 3142 [pcf] Prepare to replace charmap implementation. 3143 3144 * src/pcf/pcf.h (PCF_FaceRec): Updated to include... 3145 (PCF_EncRec): ... this new structure to store charmap geometry. 3146 3147 * src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry. 3148 31492018-09-18 Alexei Podtelezhnikov <apodtele@gmail.com> 3150 3151 Remove unused fields. 3152 3153 * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'. 3154 * src/bdfdrvr.h (BDF_FaceRec): Ditto. 3155 * src/winfonts/winfnt.h (FNT_FaceRec): Ditto. 3156 31572018-09-17 Werner Lemberg <wl@gnu.org> 3158 3159 [pshinter] Handle numeric overflow. 3160 3161 Reported as 3162 3163 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396 3164 3165 * src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H. 3166 (psh_blues_snap_stem): Mask numeric overflow. 3167 31682018-09-13 Werner Lemberg <wl@gnu.org> 3169 3170 [truetype] Some fixes for VF checks. 3171 3172 Reported as 3173 3174 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317 3175 3176 * src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory 3177 frame if we have invalid glyph variation data offsets. 3178 (tt_face_vary_cvt): Protect against missing `tuplecoords' array. 3179 Fix typo. 3180 31812018-09-13 Werner Lemberg <wl@gnu.org> 3182 3183 * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit. 3184 31852018-09-13 Werner Lemberg <wl@gnu.org> 3186 3187 * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'. 3188 3189 Reported as 3190 3191 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316 3192 31932018-09-12 John Tytgat <John.Tytgat@esko.com> 3194 3195 [sfnt] Better PS name handling (#54629). 3196 3197 * src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks. 3198 (get_win_string, get_apple_string): Return NULL when the PostScript 3199 font name characters is not according to specification. 3200 (get_win_string): Make trace output work if the high byte if 3201 non-zero. 3202 (sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred 3203 Win PS name (when there is also an Apple PS name); change this into 3204 a fallback to Apple PS name in case the Win PS name is invalid. 3205 32062018-09-12 Werner Lemberg <wl@gnu.org> 3207 3208 [truetype] Improve VF check. 3209 3210 Triggered by 3211 3212 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255 3213 3214 * src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check 3215 for `tupleCount'. 3216 32172018-09-12 Werner Lemberg <wl@gnu.org> 3218 3219 * src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'. 3220 32212018-09-10 Armin Hasitzka <prince.cherusker@gmail.com> 3222 3223 * src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow. 3224 3225 Reported as 3226 3227 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215 3228 32292018-09-09 Ben Wagner <bungeman@google.com> 3230 3231 * builds/freetype.mk (refdoc-venv): Ensure python version (#54631). 3232 32332018-09-07 Werner Lemberg <wl@gnu.org> 3234 3235 [truetype] Fix assertion failure. 3236 3237 Triggered by 3238 3239 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212 3240 3241 * src/truetype/ttgload.c (load_truetype_glyph): Reintroduce 3242 `opened_frame' (removed in a change from 2018-08-26) to handle 3243 deallocation of the second frame. 3244 32452018-09-05 Werner Lemberg <wl@gnu.org> 3246 3247 Synchronize `ftdebug.c' files. 3248 3249 * builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c, 3250 builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'. 3251 32522018-09-05 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 3253 3254 Add documentation guidelines file. 3255 3256 * docs/DOCGUIDE: New file. 3257 32582018-09-04 Werner Lemberg <wl@gnu.org> 3259 3260 * devel/ftoption.h: Synchronize with master `ftoption.h'. 3261 32622018-09-03 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 3263 3264 [docwriter] Don't break code snippets accross lines. 3265 3266 Reported as 3267 3268 https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html 3269 3270 * docs/reference/markdown/stylesheets/extra.css (.md-typeset code): 3271 Add rule `white-space'. 3272 32732018-09-03 Werner Lemberg <wl@gnu.org> 3274 3275 */*: s/PSNames/psnames/. 3276 3277 Only tracing messages are affected. 3278 32792018-09-03 Werner Lemberg <wl@gnu.org> 3280 3281 [sfnt] Fix heap buffer overflow in CPAL handling. 3282 3283 * src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test. 3284 (tt_face_load_cpal): Updated. 3285 32862018-09-01 Werner Lemberg <wl@gnu.org> 3287 3288 Remove `FT_Outline_{New,Done}_Internal'. 3289 3290 These public API functions(!) were always undocumented and have 3291 escaped all clean-up efforts until now. 3292 3293 * include/freetype/ftoutln.h (FT_Outline_New_Internal, 3294 FT_Outline_Done_Internal): Removed. 3295 3296 * src/base/ftoutln.h (FT_Outline_New_Internal, 3297 FT_Outline_Done_Internal): Merge into... 3298 (FT_Outline_New, FT_Outline_Done): ... these functions. 3299 3300 * docs/README: Updated. 3301 33022018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> 3303 3304 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format. 3305 33062018-08-31 Armin Hasitzka <prince.cherusker@gmail.com> 3307 3308 [errors] Refine the macro logic surrounding `FT_Error_String'. 3309 3310 * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS, 3311 FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after 3312 checking it and introduce a new macro that takes proper care of 3313 multiple-inclusion protection. 3314 33152018-08-31 Werner Lemberg <wl@gnu.org> 3316 3317 * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls. 3318 33192018-08-31 Werner Lemberg <wl@gnu.org> 3320 3321 * src/base/ftdebug.c (FT_Throw): Reduce chattiness. 3322 33232018-08-31 Werner Lemberg <wl@gnu.org> 3324 3325 * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization. 3326 33272018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> 3328 3329 Consolidate bitmap presetting and size assessment. 3330 3331 * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): 3332 Change return type. 3333 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap 3334 size assessment. 3335 3336 * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the 3337 rendering of enourmous or far-fetched outlines. 3338 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. 3339 33402018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> 3341 3342 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono. 3343 33442018-08-30 Armin Hasitzka <prince.cherusker@gmail.com> 3345 3346 [errors] Introduce a macro to control `FT_Error_String'. 3347 3348 * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS), 3349 include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS): 3350 New macro. 3351 33522018-08-30 Armin Hasitzka <prince.cherusker@gmail.com> 3353 3354 [errors] Introduce `FT_Error_String'. 3355 3356 * include/freetype/fterrors.h (FT_Error_String), 3357 src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'. 3358 3359 * src/base/ftbase.c, src/base/Jamfile (_source), 3360 src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic. 3361 3362 * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'. 3363 33642018-08-30 Werner Lemberg <wl@gnu.org> 3365 3366 [autofit] Trace `before' and `after' edges of strong points. 3367 3368 * src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays 3369 `before' and `after'. 3370 3371 * src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary 3372 function. 3373 (af_glyph_hints_dump_points): Trace `before' and `after' edges. 3374 (af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set 3375 `before' and `after' information. 3376 33772018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> 3378 3379 [base] Overflow-resistant bitmap presetting. 3380 3381 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it. 3382 33832018-08-29 Armin Hasitzka <prince.cherusker@gmail.com> 3384 3385 Fix numeric overflows. 3386 3387 * src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light, 3388 psh_hint_table_find_strong_points): Fix numeric overflows. 3389 3390 Reported as 3391 3392 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083 3393 33942018-08-29 Werner Lemberg <wl@gnu.org> 3395 3396 [cff] Fix handling of `roll' op in old engine. 3397 3398 Reported as 3399 3400 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080 3401 3402 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll> 3403 [CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as 3404 documented in the specification. 3405 34062018-08-26 Werner Lemberg <wl@gnu.org> 3407 3408 * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values. 3409 34102018-08-26 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 3411 3412 * configure: Copy assets required by docwriter. 3413 3414 Copy directory `docs/reference/markdown' when FreeType is compiled in a 3415 different directory. 3416 3417 Fixes `make refdoc' if builddir != srcdir. 3418 3419 Reported as 3420 3421 https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html 3422 34232018-08-26 Werner Lemberg <wl@gnu.org> 3424 3425 * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow. 3426 3427 Reported as 3428 3429 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057 3430 34312018-08-26 Werner Lemberg <wl@gnu.org> 3432 3433 Minor tracing adjustments. 3434 3435 * src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame): 3436 Trace. 3437 3438 * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing. 3439 34402018-08-26 Werner Lemberg <wl@gnu.org> 3441 3442 [truetype] Avoid nested frames. 3443 3444 Triggered by 3445 3446 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054 3447 3448 * src/truetype/ttgload.c (load_truetype_glyph): Don't use variable 3449 `opened_frame' to trace whether a frame must be closed at the end of 3450 function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which 3451 gets called for space glyphs) uses a frame by itself. Instead, 3452 close the frame after loading the header, then use another frame for 3453 the remaining part of the glyph later on. 3454 3455 Also avoid calling `tt_get_metrics' twice under some circumstances. 3456 34572018-08-26 Werner Lemberg <wl@gnu.org> 3458 3459 Various minor clean-ups. 3460 3461 * src/base/ftapi.c: Remove. Unused. 3462 * src/base/Jamfile (_sources): Updated. 3463 3464 * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant 3465 code. 3466 34672018-08-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 3468 3469 Convert documentation markup to Markdown. 3470 3471 It is the result of a GSoC 2018 project; this separate ChangeLog 3472 commit covers the last four commits 3473 3474 ae5d1a4cec37557f31aec270332cfe886a62f9a0 3475 53c69ce04faed3dcc68ca0f54cb8d703d8babf69 3476 195728d5ba38f34fb2c2c20807c01656f2f59b66 3477 c962db28ea59225f0105c03d907d4a9b71765687 3478 3479 * docs/reference/markdown/images/favico.ico, 3480 docs/reference/markdown/javascripts/extra.js, 3481 docs/reference/markdown/stylesheets/extra.css: New files. 3482 3483 * docs/reference/.gitignore, docs/reference/README: Updated. 3484 3485 * src/tools/docmaker/*: Removed. It has been replaced with 3486 `docwriter', a python package available at 3487 3488 https://pypi.org/project/docwriter/ 3489 3490 * Jamfile: Updated. 3491 * builds/ansi/ansi-def.mk, builds/beos/beos-def.mk, 3492 builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN), 3493 builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable. 3494 3495 * builds/unix/configure.raw: Check for `python' and `pip'. 3496 If not present, warn that `make refdoc' will fail. 3497 * builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables. 3498 3499 * builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON, 3500 ENV_PIP): New variables. 3501 (refdoc): Updated. 3502 (refdoc-venv): New target. 3503 (.PHONY): Updated. 3504 35052018-08-23 Werner Lemberg <wl@gnu.org> 3506 3507 Add macros for handling over-/underflowing `FT_Int64' values. 3508 3509 * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64, 3510 MUL_INT64, DIV_INT64) [FT_LONG64]: New macros. 3511 3512 * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use 3513 `SUB_INT64' and `MUL_INT64'. 3514 3515 Reported as 3516 3517 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028 3518 35192018-08-22 Werner Lemberg <wl@gnu.org> 3520 3521 [truetype] Improve legibility of `glyf' parsing. 3522 3523 * src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR, 3524 Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y, 3525 OVERLAP_SIMPLE): New macros. 3526 (TT_Load_Simple_Glyph): Use new macros to make code more readable. 3527 Remove useless adjustment of `outline->tags' elements. 3528 35292018-08-21 Werner Lemberg <wl@gnu.org> 3530 3531 * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check. 3532 3533 Reported as 3534 3535 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981 3536 35372018-08-18 Werner Lemberg <wl@gnu.org> 3538 3539 [psaux] Avoid slow PS font parsing in case of error. 3540 3541 Reported as 3542 3543 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955 3544 3545 * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even 3546 in case of error to avoid potential re-scanning. 3547 35482018-08-18 Werner Lemberg <wl@gnu.org> 3549 3550 [cff] Fix heap buffer overflow in old engine. 3551 3552 Reported as 3553 3554 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967 3555 3556 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) 3557 <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be 3558 non-zero. 3559 35602018-08-16 Young Xiao <yangx92@hotmail.com> 3561 3562 * builds/mac/ftmac.c (parse_fond): Fix buffer overrun. 3563 3564 Reported as bug #54515, duplicate of #43540. 3565 35662018-08-16 Werner Lemberg <wl@gnu.org> 3567 3568 * builds/*/ftsystem.c (FT_COMPONENT): Updated also. 3569 35702018-08-15 Alexei Podtelezhnikov <apodtele@gmail.com> 3571 3572 [bdf] Don't track duplicate encodings. 3573 3574 There is no harm except some umbiguity in broken fonts with duplicate 3575 encodings. 3576 3577 * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking. 3578 (_bdf_parse_t): Remove large `have' bitfield. 3579 35802018-08-15 Werner Lemberg <wl@gnu.org> 3581 3582 Don't use `trace_' prefix for FT_COMPONENT arguments. 3583 3584 * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, 3585 FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. 3586 (FT_TRACE): Use `FT_TRACE_COMP'. 3587 3588 */* (FT_COMPONENT): Updated. 3589 35902018-08-14 Werner Lemberg <wl@gnu.org> 3591 3592 Use formatting string in FT_TRACEX calls for non-simple arguments. 3593 3594 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) 3595 <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>: 3596 Do it. 3597 3598 * src/psaux/pshints.c (cf2_hintmap_build): Ditto. 3599 3600 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, 3601 cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR, 3602 cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto. 3603 3604 * src/truetype/ttinterp.c (TT_RunIns): Ditto. 3605 36062018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> 3607 3608 [bdf] Remove unused fields. 3609 3610 * src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified', 3611 which were set but never used. 3612 * src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font): 3613 Updated accordingly. 3614 36152018-08-14 Werner Lemberg <wl@gnu.org> 3616 3617 [cff] Fix another segv in old engine. 3618 3619 Reported as 3620 3621 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872 3622 3623 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) 3624 [CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in 3625 dictionaries. 3626 36272018-08-14 Werner Lemberg <wl@gnu.org> 3628 3629 [cff] Fix missing error handling. 3630 3631 Reported as 3632 3633 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865 3634 3635 * src/psaux/cffparse.c (cff_parser_run) 3636 [CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of 3637 `parse_charstrings_old'. 3638 36392018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> 3640 3641 [bdf] Remove unused overflow storage. 3642 3643 * src/bdf/bdf.h (bdf_glyphlist_t): Remove this type. 3644 (bdf_font_t): Remove `overflow' field. 3645 * src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing. 3646 36472018-08-14 Werner Lemberg <wl@gnu.org> 3648 3649 [cff] Fix segv in old engine. 3650 3651 Reported as 3652 3653 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864 3654 3655 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) 3656 <cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's 3657 `random' field directly if parsing dictionaries. 3658 36592018-08-13 Alexei Podtelezhnikov <apodtele@gmail.com> 3660 3661 [bdf] Use unsigned types. 3662 3663 * src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'. 3664 (bdf_font_t): Unsign `default_char'. 3665 * src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'. 3666 3667 * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs, 3668 _bdf_parse_start): Updated accordingly. 3669 * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto. 3670 36712018-08-13 Werner Lemberg <wl@gnu.org> 3672 3673 * src/type42/t42parse.c (t42_parse_sfnts): One more format check. 3674 3675 Reported as 3676 3677 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832 3678 36792018-08-11 Werner Lemberg <wl@gnu.org> 3680 3681 * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow. 3682 3683 Reported as 3684 3685 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811 3686 36872018-08-10 Alexei Podtelezhnikov <apodtele@gmail.com> 3688 3689 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs. 3690 36912018-08-10 Ben Wagner <bungeman@google.com> 3692 3693 * src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435). 3694 36952018-08-10 Werner Lemberg <wl@gnu.org> 3696 3697 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing. 3698 36992018-08-10 Werner Lemberg <wl@gnu.org> 3700 3701 Fix clang warnings. 3702 3703 * src/base/ftdebug.c (ft_trace_level_enabled, 3704 ft_trace_level_disabled): Add `static' keyword. 3705 37062018-08-09 Alexei Podtelezhnikov <apodtele@gmail.com> 3707 3708 [raster, smooth] Reinstate bitmap size limits. 3709 3710 This again moves outline and bitmap size checks one level up. 3711 3712 * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous 3713 outlines. 3714 * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps 3715 and, therefore, outlines that require them. 3716 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. 3717 3718 * src/raster/ftraster.c (ft_black_render): Remove outline size checks. 3719 * src/smooth/ftgrays.c (gray_raster_render): Ditto. 3720 [STANDALONE]: Remove `FT_Outline_Get_CBox' copy. 3721 37222018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> 3723 3724 [pcf] Revert massive unsigning. 3725 37262018-08-08 Werner Lemberg <wl@gnu.org> 3727 3728 [smooth] Improve tracing. 3729 3730 * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing 3731 if called the first time. 3732 (gray_convert_glyph): Updated. 3733 37342018-08-08 Werner Lemberg <wl@gnu.org> 3735 3736 Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'. 3737 3738 It sometimes makes sense to suppress tracing informations, for 3739 example, if it outputs identical messages again and again. 3740 3741 * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a 3742 pointer. 3743 (FT_Trace_Disable, FT_Trace_Enable): New declarations. 3744 3745 * src/base/ftdebug.c (ft_trace_levels): Rename to... 3746 (ft_trace_levels_enabled): ... this. 3747 (ft_trace_levels_disabled): New array. 3748 (ft_trace_levels): New pointer. 3749 (FT_Trace_Disable, FT_Trace_Enable): Implement. 3750 (ft_debug_init): Updated. 3751 37522018-08-08 Werner Lemberg <wl@gnu.org> 3753 3754 Debugging improvements. 3755 3756 * src/base/ftobjs.c (pixel_modes): Move this array to top level 3757 from ... 3758 (FT_Load_Glyph): ... here. 3759 (FT_Render_Glyph_Internal): Use `width' x `height' in trace message. 3760 Use `pixel_modes'. 3761 37622018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> 3763 3764 [pcf] Massive unsigning (part 2). 3765 3766 Treat all size related properties as unsigned values. 3767 3768 * src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and 3769 `value'. 3770 * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated 3771 parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, 3772 RESOLUTION_X and RESOLUTION_Y. 3773 37742018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> 3775 3776 [pcf] Massive unsigning (part 1). 3777 3778 Unofficial specifications hesitate to use unsigned 32-bit integers. 3779 Negative values caused a lot of trouble in the past and it is safer 3780 and easier to treat some properties as unsigned. 3781 3782 * src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent', 3783 `fontDescent', and `maxOverlap'. 3784 * src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated. 3785 * src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select, 3786 PCF_Size_Request): Updated. 3787 37882018-08-07 Alexei Podtelezhnikov <apodtele@gmail.com> 3789 3790 * src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and 3791 `bitmapSizes'. 3792 37932018-08-06 Werner Lemberg <wl@gnu.org> 3794 3795 * devel/ftoption.h: Synchronize with main `ftoption.h'. 3796 37972018-08-06 Alexei Podtelezhnikov <apodtele@gmail.com> 3798 3799 [pcf] Use unsigned types. 3800 3801 * src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'. 3802 * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto. 3803 * src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types. 3804 38052018-08-05 Werner Lemberg <wl@gnu.org> 3806 3807 * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow. 3808 3809 Reported as 3810 3811 https://bugs.chromium.org/p/chromium/issues/detail?id=777151 3812 38132018-08-04 Werner Lemberg <wl@gnu.org> 3814 3815 * src/truetype/ttinterp.c (opcode_name): Fix typos. 3816 38172018-08-04 Werner Lemberg <wl@gnu.org> 3818 3819 Fix clang warnings. 3820 3821 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of 3822 `orientation'. 3823 3824 * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature. 3825 3826 * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables. 3827 Add cast. 3828 3829 * src/type1/t1load.c (parse_weight_vector): Fix cast. 3830 38312018-07-31 Werner Lemberg <wl@gnu.org> 3832 3833 * src/cid/cidtoken.h: Handle `XUID' keyword. 3834 38352018-07-31 Werner Lemberg <wl@gnu.org> 3836 3837 [cid] Trace PostScript dictionaries. 3838 3839 * src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. 3840 (cid_load_keyword, cid_parse_font_matrix, parse_fd_array, 3841 parse_expansion_factor, cid_parse_dict): Add tracing calls. 3842 (parse_font_name): New function to trace `/FontName' keywords in 3843 /FDArray dict. 3844 (cid_field_records): Register `parse_font_name'. 3845 38462018-07-30 Werner Lemberg <wl@gnu.org> 3847 3848 [cff] Fix typo. 3849 3850 Reported as 3851 3852 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409 3853 3854 * src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary 3855 check. 3856 38572018-07-29 Werner Lemberg <wl@gnu.org> 3858 3859 * src/pcf/pcfread.c (pcf_get_encodings): Another thinko. 3860 3861 Reported as 3862 3863 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608 3864 38652018-07-28 Alexei Podtelezhnikov <apodtele@gmail.com> 3866 3867 [smooth] Fix Harmony memory management. 3868 3869 Reported as 3870 3871 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501 3872 3873 * src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer 3874 after each rendering in case of failure. 3875 38762018-07-28 Werner Lemberg <wl@gnu.org> 3877 3878 [type1] Avoid segfaults with `FT_Get_PS_Font_Value'. 3879 3880 Reported as 3881 3882 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610 3883 3884 * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL. 3885 38862018-07-27 Werner Lemberg <wl@gnu.org> 3887 3888 [truetype] Make `TT_Set_MM_Blend' idempotent (#54388). 3889 3890 * src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set 3891 `face->doblend' if the current call to the function yields the same 3892 blend coordinates as the previous call. 3893 38942018-07-27 Werner Lemberg <wl@gnu.org> 3895 3896 [psaux, type1]: More tracing improvements. 3897 3898 * src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped 3899 outline commands. 3900 3901 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix 3902 missing case. 3903 (t1_decoder_parse_metrics): Make tracing output more compact. 3904 3905 * src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose. 3906 (T1_Get_Advances): Add tracing. 3907 39082018-07-25 Werner Lemberg <wl@gnu.org> 3909 3910 [psaux, type1] Trace PostScript dictionaries and other things. 3911 3912 The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary 3913 right now. 3914 3915 * src/psaux/psobjs.c (ps_parser_load_field, 3916 ps_parser_load_field_table): Add tracing calls. 3917 3918 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing 3919 output more compact. 3920 3921 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add 3922 tracing messages. 3923 3924 * src/type1/t1load.c (parse_blend_axis_types, 3925 parse_blend_design_positions, parse_blend_design_map, 3926 parse_weight_vector, t1_load_keyword, t1_parse_font_matrix, 3927 parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add 3928 tracing calls. 3929 3930 * src/type1/t1objs.c (T1_Face_Init): Add tracing call. 3931 3932 * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more 3933 verbose. 3934 39352018-07-25 Werner Lemberg <wl@gnu.org> 3936 3937 Fix minor ASAN run-time warnings. 3938 3939 * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call 3940 `FT_MEM_ZERO' if we actually have a buffer. 3941 (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer. 3942 39432018-07-24 Alexei Podtelezhnikov <apodtele@gmail.com> 3944 3945 [build] Fortify dllexport/dllimport attributes (#53969,#54330). 3946 3947 We no longer use predefined _DLL, which can be defined for static 3948 builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead, 3949 following libtool convention. 3950 3951 * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj: 3952 Define DLL_EXPORT manually. 3953 3954 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, 3955 builds/vms/ftconfig.h, builds/windows/vc2010/index.html, 3956 src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/. 3957 39582018-07-24 Werner Lemberg <wl@gnu.org> 3959 3960 [type1] Check relationship between number of axes and designs. 3961 3962 For Multiple Masters fonts we don't support intermediate designs; 3963 this implies that 3964 3965 number_of_designs == 2 ^^ number_of_axes 3966 3967 Reported as 3968 3969 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557 3970 3971 * src/type1/t1load.c (T1_Open_Face): Ensure above constraint. 3972 (T1_Get_MM_Var): Remove now redundant test. 3973 39742018-07-24 Hin-Tak Leung <htl10@users.sourceforge.net> 3975 3976 [truetype] Match ttdebug's naming of instruction mnemonics. 3977 3978 * src/truetype/ttinterp.c: The form used in ttdebug, 3979 "MDRP[G,B,W,?]", etc., is slightly more readable than 3980 "MDRP[00,01,02,03]". 3981 39822018-07-24 Werner Lemberg <wl@gnu.org> 3983 3984 * src/pcf/pcfread.c (pcf_get_encodings): Thinko. 3985 3986 Reported as 3987 3988 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561 3989 39902018-07-22 Werner Lemberg <wl@gnu.org> 3991 3992 * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar. 3993 3994 Reported as 3995 3996 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527 3997 39982018-07-22 Werner Lemberg <wl@gnu.org> 3999 4000 * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs. 4001 4002 This is an oversight of the module change 2018-07-21. 4003 4004 Reported as 4005 4006 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524 4007 40082018-07-22 Werner Lemberg <wl@gnu.org> 4009 4010 [cid] Sanitize `BlueShift' and `BlueFuzz'. 4011 4012 This code is taken from the type1 module. 4013 4014 Reported as 4015 4016 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510 4017 4018 * src/cid/cidload.c (parse_fd_array): Set some private dict default 4019 values. 4020 (cid_face_open): Do the sanitizing. 4021 Fix some tracing messages. 4022 40232018-07-21 Werner Lemberg <wl@gnu.org> 4024 4025 [pcf] Fix handling of the undefined glyph. 4026 4027 This change makes the driver use the `defaultChar' property of PCF 4028 files. 4029 4030 * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to 4031 unsigned. 4032 4033 * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as 4034 unsigned. 4035 Validate `defaultChar'. 4036 If `defaultChar' doesn't point to glyph index zero, swap glyphs with 4037 index zero and index `defaultChar' and adjust the encodings 4038 accordingly. 4039 4040 * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next, 4041 PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced 4042 the first character in the font to be the default character. 4043 40442018-07-20 Armin Hasitzka <prince.cherusker@gmail.com> 4045 4046 Move the legacy fuzz target to the `freetype-testing' repository. 4047 4048 It can now be found at 4049 4050 https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy 4051 4052 * src/tools/ftfuzzer: Remove this folder and its contents from the 4053 repository. 4054 40552018-07-20 Werner Lemberg <wl@gnu.org> 4056 4057 [cff] Avoid left-shift of negative numbers (#54322). 4058 4059 * src/cff/cffgload.c (cff_slot_load): Use multiplication. 4060 40612018-07-17 Werner Lemberg <wl@gnu.org> 4062 4063 Allow FT_ENCODING_NONE for `FT_Select_Charmap'. 4064 4065 This is a valid encoding tag for BDF, PCF, and Windows FNT, and 4066 there is no reason to disallow it for these formats. 4067 4068 * src/base/ftobjs.c (FT_Select_Charmap): Implement it. 4069 40702018-07-17 Werner Lemberg <wl@gnu.org> 4071 4072 * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'. 4073 40742018-07-16 Armin Hasitzka <prince.cherusker@gmail.com> 4075 4076 * include/freetype/internal/ftcalc.h: Add macros for handling 4077 harmless over-/underflowing `FT_Int' values. 4078 4079 * src/sfnt/sfdriver.c (fixed2float): Fix negation of 4080 `(int)(-2147483648)'. 4081 4082 Reported as 4083 4084 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423 4085 40862018-07-16 Werner Lemberg <wl@gnu.org> 4087 4088 * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error. 4089 4090 Reported as 4091 4092 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412 4093 40942018-07-12 Werner Lemberg <wl@gnu.org> 4095 4096 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'. 4097 4098 Taken from patch #9667, written by Steve Langasek 4099 <vorlon@debian.org>. 4100 4101 This fixes a build failure (most probably a bug in gcc) on ppc64el 4102 when building with -O3. 4103 41042018-07-05 Werner Lemberg <wl@gnu.org> 4105 4106 Fix typo (#54238). 4107 4108 * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color) 4109 [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value. 4110 41112018-07-05 Werner Lemberg <wl@gnu.org> 4112 4113 Adjust table size comparisons (#54242). 4114 4115 * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it. 4116 41172018-07-05 Werner Lemberg <wl@gnu.org> 4118 4119 Fix more 32bit issues (#54208). 4120 4121 * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into 4122 run-time error. 4123 4124 * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against 4125 numeric overflow. 4126 41272018-07-04 Werner Lemberg <wl@gnu.org> 4128 4129 Fix 32bit build warnings (#54239). 4130 4131 * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed 4132 vs. unsigned comparisons. 4133 4134 * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto. 4135 41362018-07-02 Jeff Carey <Jeff.Carey@monotype.com> 4137 4138 * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging. 4139 41402018-07-02 Werner Lemberg <wl@gnu.org> 4141 4142 s/palette_types/palette_flags/. 4143 4144 Suggested by Behdad. 4145 41462018-07-02 Werner Lemberg <wl@gnu.org> 4147 4148 Make `FT_Get_Color_Glyph_Layer' return FT_Bool. 4149 4150 * include/freetype/freetype.h, src/base/ftobjs.c 4151 (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated. 4152 4153 * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func), 4154 src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer): 4155 Updated. 4156 41572018-07-01 Werner Lemberg <wl@gnu.org> 4158 4159 * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function. 4160 4161 Reported by Behdad. 4162 41632018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> 4164 4165 * src/base/fttrigon.c (FT_Tan): Improve accuracy. 4166 (FT_Vector_Rotate): Simplify. 4167 41682018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> 4169 4170 * src/base/ftobjs.c (FT_Set_Charmap): Robustify. 4171 41722018-06-25 Werner Lemberg <wl@gnu.org> 4173 4174 [truetype] Fix memory leak. 4175 4176 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers. 4177 Fix typo in `goto' destination. 4178 4179 Reported as 4180 4181 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071 4182 41832018-06-25 Werner Lemberg <wl@gnu.org> 4184 4185 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers. 4186 4187 Reported as 4188 4189 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070 4190 41912018-06-24 Werner Lemberg <wl@gnu.org> 4192 4193 [truetype] Increase precision while applying VF deltas. 4194 4195 It turned out that we incorrectly round CVT and glyph point deltas 4196 before accumulation, leading to severe positioning errors if there 4197 are many delta values to sum up. 4198 4199 Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed 4200 by Behdad. 4201 4202 * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in 4203 16.16 format. 4204 (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16 4205 format array, and add the accumulated values to the CVT at the end 4206 of the function. 4207 (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and 4208 `points_out' in 16.16 format. 4209 Collect deltas in `point_deltas_x' and `point_deltas_y', which are 4210 16.16 format arrays, and add the accumulated values to the glyph 4211 coordinates at the end of the function. 4212 42132018-06-24 Werner Lemberg <wl@gnu.org> 4214 4215 New base function `FT_Matrix_Check' (#54019). 4216 4217 * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly 4218 reject degenerate font matrices. 4219 4220 * include/freetype/internal/ftcalc.h: Updated. 4221 4222 * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c 4223 (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix), 4224 src/type42/t42parse.c (t42_parse_font_matrix): Use 4225 `FT_Matrix_Check'. 4226 42272018-06-23 Werner Lemberg <wl@gnu.org> 4228 4229 Fix typo. 4230 4231 Reported by Behdad. 4232 4233 * src/base/ftcolor.c (FT_Palette_Data_Get) 4234 [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/. 4235 42362018-06-21 Werner Lemberg <wl@gnu.org> 4237 4238 s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/. 4239 4240 * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h, 4241 src/sfnt/ttcolr.c: Do it. 4242 42432018-06-19 Werner Lemberg <wl@gnu.org> 4244 4245 [sfnt] Fix CPAL heap buffer overflow. 4246 4247 Reported as 4248 4249 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968 4250 4251 * src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1 4252 offsets. 4253 42542018-06-19 Werner Lemberg <wl@gnu.org> 4255 4256 Doh. Don't use CPAL or COLR data if tables are missing. 4257 4258 Reported by Alexei. 4259 4260 * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if 4261 `colr' is NULL. 4262 4263 * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if 4264 `cpal' is NULL. 4265 42662018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com> 4267 4268 [base] Introduce `FT_New_Glyph'. 4269 4270 This function facilitates access to full capabilities of FreeType 4271 rendering engine for custom glyphs. This can be quite useful for 4272 consistent rendering of mathematical and chemical formulas, e.g. 4273 4274 https://bugs.chromium.org/p/chromium/issues/detail?id=757078 4275 4276 * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New 4277 function. 4278 42792018-06-17 Armin Hasitzka <prince.cherusker@gmail.com> 4280 4281 [bdf] Fix underflow of an unsigned value. 4282 4283 bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That 4284 caused an underflow of the unsigned value which results in undefined 4285 behaviour. 4286 4287 * src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before 4288 if the `ENCODING' keyword cannot be found. 4289 42902018-06-17 Werner Lemberg <wl@gnu.org> 4291 4292 [base] Add tracing for `FT_Bitmap_Blend'. 4293 4294 * include/freetype/internal/fttrace.h (trace_bitmap): New 4295 enumeration. 4296 4297 * src/base/ftbitmap.c (FT_COMPONENT): Define. 4298 (FT_Bitmap_Blend): Add `FT_TRACE5' calls. 4299 43002018-06-17 Werner Lemberg <wl@gnu.org> 4301 4302 s/trace_bitmap/trace_checksum/. 4303 4304 * include/freetype/internal/fttrace.h: s/bitmap/checksum/. 4305 4306 * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/. 4307 Adjust code. 4308 43092018-06-16 Werner Lemberg <wl@gnu.org> 4310 4311 [sfnt] Fix color glyph layer loading. 4312 4313 * src/sfnt/ttcolr.c (Colr): Add `table_size' field. 4314 (tt_face_load_colr): Set it. 4315 (tt_face_get_colr_layer): Check pointer limit for layer entries. 4316 43172018-06-16 Werner Lemberg <wl@gnu.org> 4318 4319 [sfnt] Fix color palette loading. 4320 4321 Reported as 4322 4323 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933 4324 4325 * src/sfnt/ttcpal.c (Cpal): Add `table_size' field. 4326 (tt_face_load_cpal): Set it. 4327 (tt_face_palette_set): Check pointer limit for color entries. 4328 43292018-06-16 Werner Lemberg <wl@gnu.org> 4330 4331 * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow. 4332 43332018-06-16 Werner Lemberg <wl@gnu.org> 4334 4335 Add `FT_Bitmap_Blend' API. 4336 4337 Still missing: Support for negative bitmap pitch and subpixel offset 4338 of source bitmap. 4339 4340 * include/freetype/ftbitmap.h, src/base/ftbitmap.c 4341 (FT_Bitmap_Blend): New function. 4342 43432018-06-14 Werner Lemberg <wl@gnu.org> 4344 4345 Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'. 4346 4347 This avoids any additional allocation of COLR related structures in 4348 a glyph slot. 4349 4350 * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec, 4351 FT_Get_GlyphLayers): Removed. 4352 4353 * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed. 4354 (FT_Slot_InternalRec): Remove `color_layers'. 4355 4356 * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): 4357 Removed. 4358 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove 4359 `load_colr_layer'. 4360 4361 * src/base/ftobjs.c (ft_glyph_slot_done): Updated. 4362 (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'. 4363 (FT_Get_GlyphLayers): Removed. 4364 4365 * src/sfnt/sfdriver.c (sfnt_interface): Updated. 4366 4367 * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed. 4368 * src/sfnt/ttcolr.h: Updated. 4369 4370 * src/truetype/ttgload.c (TT_Load_Glyph): Updated. 4371 43722018-06-14 Werner Lemberg <wl@gnu.org> 4373 4374 Provide iterative API to access `COLR' data. 4375 4376 This solution doesn't store any data in an `FT_GlyphSlot' object. 4377 4378 * include/freetype/freetype.h (FT_LayerIterator): New structure. 4379 (FT_Get_Color_Glyph_Layer): New function. 4380 4381 * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New 4382 function type. 4383 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it. 4384 4385 * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it. 4386 4387 * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function. 4388 * src/sfnt/ttcolr.h: Updated. 4389 4390 * src/sfnt/sfdriver.c (sfnt_interface): Updated. 4391 43922018-06-14 Werner Lemberg <wl@gnu.org> 4393 4394 Add glyph index and glyph load flags to glyph slot. 4395 4396 * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused 4397 `reserved' field to `glyph_index'. 4398 4399 * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add 4400 `load_flags' field. 4401 4402 * src/base/ftobjs.c (FT_Load_Glyph): Set new fields. 4403 44042018-06-14 Werner Lemberg <wl@gnu.org> 4405 4406 [sfnt] Move `CPAL' stuff into separate files. 4407 4408 * src/sfnt/sfdriver.c: Include `ttcpal.h'. 4409 * src/sfnt/sfnt.c: Include `ttcpal.c'. 4410 4411 * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ... 4412 * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files. 4413 4414 * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): 4415 Updated. 4416 4417 * include/freetype/internal/fttrace.h: Add support for `colr' and 4418 `cpal'. 4419 Sort entries. 4420 44212018-06-13 Werner Lemberg <wl@gnu.org> 4422 4423 [sfnt] Separate `CPAL' and `COLR' table handling. 4424 4425 Later on we want to support the `SVG' table also, which needs `CPAL' 4426 (but not `COLR'). 4427 4428 * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal' 4429 and `free_cpal' fields. 4430 (FT_DEFINE_SFNT_INTERFACE): Updated. 4431 4432 * include/freetype/internal/tttypes.h (TT_FaceRec): Replace 4433 `colr_and_cpal' fields with `cpal' and `colr'. 4434 4435 * src/sfnt/sfdriver.c (sfnt_interface): Updated. 4436 4437 * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated. 4438 4439 * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field. 4440 (ColrCpal): Removed. 4441 (tt_face_load_colr): Split off CPAL handling into... 4442 (tt_face_load_cpal): ... this new function. 4443 (tt_face_free_colr): Split off CPAL handling into... 4444 (tt_face_free_cpal): ... this new function. 4445 (tt_face_load_colr_layers, tt_face_palette_set): Updated. 4446 4447 * src/sfnt/ttcolr.h: Updated. 4448 4449 * src/truetype/ttgload.c (TT_Load_Glyph): Updated. 4450 44512018-06-12 Werner Lemberg <wl@gnu.org> 4452 4453 [sfnt] Fix `sizeof' thinko. 4454 4455 * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't 4456 use `sizeof' for computing array limit. 4457 44582018-06-12 Werner Lemberg <wl@gnu.org> 4459 4460 Finish CPAL/COLR support (4/4). 4461 4462 * src/sfnt/ttcolr.c (tt_face_find_color): Removed. 4463 (tt_face_colr_blend_layer): Use `face->palette' instead of calling 4464 `tt_face_find_color'. 4465 Use and set text foreground color. 4466 44672018-06-12 Werner Lemberg <wl@gnu.org> 4468 4469 Finish CPAL/COLR support (3/4). 4470 4471 * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H. 4472 (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement 4473 functions. 4474 44752018-06-12 Werner Lemberg <wl@gnu.org> 4476 4477 Finish CPAL/COLR support (2/4). 4478 4479 * src/sfnt/ttcolr.c (tt_face_palette_set): New function. 4480 (tt_face_load_colr): Allocate `face->palette' and call 4481 `tt_face_palette_set'. 4482 Adjust return error code in case of error. 4483 4484 * src/sfnt/ttcolr.h: Updated. 4485 4486 * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New 4487 function type. 4488 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it. 4489 4490 * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c 4491 (sfnt_done_face): Updated. 4492 44932018-06-12 Werner Lemberg <wl@gnu.org> 4494 4495 Finish CPAL/COLR support (1/4). 4496 4497 * include/freetype/internal/tttypes.h (TT_FaceRec): New fields 4498 `palette_index', `palette', `have_foreground_color' and 4499 `foreground_color'. 4500 45012018-06-12 Werner Lemberg <wl@gnu.org> 4502 4503 [sfnt] Minor. 4504 4505 * src/sfnt/ttcolr.c (tt_face_load_colr_layers): 4506 s/palette_index/palette_entry_index/ for consistency. 4507 Adjust return error code in case of error. 4508 45092018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com> 4510 4511 [raster] Clean up. 4512 4513 * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision): 4514 Clean up after 5-level gray removal (8dc8635874). 4515 (Vertical_Sweep_Span): Be brief. 4516 45172018-06-10 Werner Lemberg <wl@gnu.org> 4518 4519 [sfnt] Fix compiler warnings. 4520 4521 * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers, 4522 tt_face_colr_blend_layer): Add `NULL' initializers. 4523 45242018-06-10 Werner Lemberg <wl@gnu.org> 4525 4526 s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/. 4527 4528 * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h, 4529 src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated. 4530 45312018-06-10 Nikolaus Waxweiler <madigens@gmail.com> 4532 4533 CMakeLists: also accept IOS_PLATFORM=SIMULATOR64 4534 4535 This might be needed to build FreeType for the iOS simulator. See 4536 https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed 4537 by Steve Robinson. 4538 4539 * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64 4540 45412018-06-10 Werner Lemberg <wl@gnu.org> 4542 4543 Implement `FT_Palette_Get'. 4544 4545 * src/base/ftcolor.c: New file. 4546 4547 * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC), 4548 src/base/ftbase.c: Add `ftcolor.c'. 4549 45502018-06-10 Werner Lemberg <wl@gnu.org> 4551 4552 * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks. 4553 45542018-06-09 Alexei Podtelezhnikov <apodtele@gmail.com> 4555 4556 [raster] Deal with pitch sign earlier. 4557 4558 * src/raster/ftraster.c (black_TWorker): Remove unused `traceG', 4559 s/bTarget/bOrigin/. 4560 (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner. 4561 (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}): 4562 Updated accordingly. 4563 45642018-06-09 Werner Lemberg <wl@gnu.org> 4565 4566 [sfnt] Read `CPAL' version 1 tables. 4567 4568 * include/freetype/internal.tttypes.h: Include FT_COLOR_H. 4569 (TT_FaceRec): Add `palette' field. 4570 4571 * src/sfnt/ttcolr.c: Include FT_COLOR_H. 4572 (Cpal): Remove all data covered by the new `palette' field in 4573 `TT_FaceRec'. 4574 (tt_face_load_colr): Updated. 4575 Read `CPAL' version 1 data. 4576 (tt_face_load_colr_layers, tt_face_find_color): Updated. 4577 4578 * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data. 4579 45802018-06-07 Alexei Podtelezhnikov <apodtele@gmail.com> 4581 4582 [base] API for Harmony LCD rendering. 4583 4584 This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary 4585 LCD subpixel geometry including non-striped patterns. 4586 4587 * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function. 4588 * include/freetype/ftlcdfil.h: Document it. 4589 * include/freetype/freetype.h: Minor. 4590 * include/freetype/ftchapters.h: Minor. 4591 45922018-06-06 Werner Lemberg <wl@gnu.org> 4593 4594 ftcolor.h: Redesign API. 4595 4596 While going to implement it I noticed that I need access to most of 4597 the `CPAL' elements; I thus plan to add a `cpal' field to 4598 `TT_FaceRec', which makes most of the previously suggested API 4599 functions obsolete because the fields will be directly accessible. 4600 46012018-06-06 Parth Wazurkar <parthwazurkar@gmail.com> 4602 4603 [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag. 4604 4605 * src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated 4606 FT_FACE_FLAG_FAST_GLYPHS flag. 4607 4608 * src/pcf/pcfread.c (pcf_load_font): Remove deprecated 4609 FT_FACE_FLAG_FAST_GLYPHS flag. 4610 46112018-06-06 Werner Lemberg <wl@gnu.org> 4612 4613 [smooth, raster] Limit bitmap size (#54019). 4614 4615 * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add 4616 function. 4617 [!STANDALONE]: Include FT_OUTLINE_H. 4618 (ft_black_render): Compute CBox and reject glyphs larger than 4619 0xFFFF x 0xFFFF. 4620 4621 * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger 4622 than 0xFFFF x 0xFFFF. 4623 46242018-06-03 Armin Hasitzka <prince.cherusker@gmail.com> 4625 4626 * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables. 4627 46282018-06-03 Werner Lemberg <wl@gnu.org> 4629 4630 * src/tools/glnames.py (main): Emit header in `light' comment style. 4631 46322018-06-02 Alexei Podtelezhnikov <apodtele@gmail.com> 4633 4634 [smooth] Attempt to mitigate bug #54019. 4635 4636 The robust rendering of estra large glyphs came with unbearable cost. 4637 The old way of bisecting should fail but fail faster. 4638 4639 * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting 4640 in y-direction. 4641 46422018-06-02 Werner Lemberg <wl@gnu.org> 4643 4644 * src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS. 4645 4646 Reported as 4647 4648 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706 4649 46502018-06-02 Werner Lemberg <wl@gnu.org> 4651 4652 * src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033). 4653 46542018-05-31 Werner Lemberg <wl@gnu.org> 4655 4656 * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field. 4657 4658 This is no longer used. 4659 46602018-05-31 Werner Lemberg <wl@gnu.org> 4661 4662 [sfnt] Get colors from `CPAL' table in right order (#54015). 4663 4664 * src/sfnt/ttcolr.c (tt_face_find_color): Fix it. 4665 46662018-05-30 Werner Lemberg <wl@gnu.org> 4667 4668 ftcolor.h: Improve API design, fix typos (#54011, #54014). 4669 4670 * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with... 4671 (FT_Palette_Get_Name_IDs): ... this function. 4672 (FT_Palette_Get_Entry_Names): Replace with... 4673 (FT_Palette_Get_Entry_Name_IDs): ... this function 4674 s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/. 4675 46762018-05-30 Armin Hasitzka <prince.cherusker@gmail.com> 4677 4678 Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b. 4679 4680 * src/autofit/afloader.c (af_loader_load_glyph): Move the 4681 initialisationand declaration of variables into the if-block. 4682 46832018-05-30 Armin Hasitzka <prince.cherusker@gmail.com> 4684 4685 Fix pointer underflow. 4686 4687 The declaration of `edge2' can be reached with `edge1 == NULL' and 4688 `axis->edges == 0' which results in undefined behaviour. 4689 4690 * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2' 4691 after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed. 4692 46932018-05-30 Werner Lemberg <wl@gnu.org> 4694 4695 Various minor color fixes. 4696 4697 * include/freetype/config/ftheader.h (FT_COLOR_H): New macro. 4698 4699 * include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change 4700 type of `load_flags' to `FT_Int32'. 4701 4702 * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change 4703 type of `idx' to `FT_UInt'. 4704 (TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'. 4705 4706 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of 4707 `load_flags' to `FT_Int32'. 4708 4709 * src/sfnt/ttcolr.c (find_base_glyph_record, 4710 tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'. 4711 (tt_face_find_color, tt_face_colr_blend_layer): Change type of 4712 `color_index' to `FT_UInt'. 4713 Fix signedness and type issues. 4714 4715 * src/sfnt/ttcolr.h: Updated. 4716 47172018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> 4718 4719 [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin. 4720 4721 This platform uses backslashes for paths, which docmaker didn't 4722 understand correctly. 4723 4724 * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use 4725 `os.path.normpath' to normalize the path for the platform being 4726 used. 4727 47282018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com> 4729 4730 [smooth] Formalize Harmony LCD rendering. 4731 4732 This generalizes magic outline shifts that make Harmony LCD 4733 rendering work in terms of precise two-dimensional RGB subpixel 4734 positions. These coordinates are now set in time of the `smooth' 4735 module initialization and later used to shift a glyph outline for 4736 rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same 4737 coordinates. The letter, however, rotates them before using. 4738 The LCD bitmap padding is also calculated using these coordinates. 4739 4740 * include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field 4741 `lcd_geometry'. 4742 * src/base/ftlcdfil.c (ft_lcd_padding): Reworked. 4743 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly. 4744 4745 * src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING] 4746 (ft_smooth_init): Initialize `lcd_geometry'. 4747 (ft_smooth_render_generic): Formalize outline shifts. 4748 47492018-05-22 Werner Lemberg <wl@gnu.org> 4750 4751 [truetype] Reject elements of composites with invalid glyph indices. 4752 4753 Reported as 4754 4755 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413 4756 4757 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it. 4758 47592018-05-22 Werner Lemberg <wl@gnu.org> 4760 4761 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points. 4762 47632018-05-20 Werner Lemberg <wl@gnu.org> 4764 4765 * include/freetype/ftcolor.h: New file. 4766 4767 This is an interface to the `CPAL' OpenType table. No 4768 implementation yet. 4769 47702018-05-18 Alexei Podtelezhnikov <apodtele@gmail.com> 4771 4772 * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'. 4773 4774 Actually `_BitScanReverse' is available since VS2005. 4775 47762018-05-18 Werner Lemberg <wl@gnu.org> 4777 4778 * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value. 4779 4780 Older VC versions don't provide `_BitScanReverse'. We test for VC 4781 2013. 4782 4783 Reported by John Emmas <john@creativepost.co.uk>. 4784 47852018-05-17 Werner Lemberg <wl@gnu.org> 4786 4787 s/inline/__inline/ for MSVC. 4788 4789 Reported by John Emmas <john@creativepost.co.uk>. 4790 4791 * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it. 4792 47932018-05-16 Werner Lemberg <wl@gnu.org> 4794 4795 Add function `FT_Get_GlyphLayers' to access `COLR' table data. 4796 4797 * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this 4798 structure to... 4799 * include/freetype/freetype.h (FT_Glyph_LayerRec): ... this 4800 header file. 4801 (FT_Glyph_Layer): New typedef. 4802 Update code to use it where appropriate. 4803 4804 * src/base/ftobjs.c (FT_Get_GlyphLayers): New function. 4805 48062018-05-15 Alexei Podtelezhnikov <apodtele@gmail.com> 4807 4808 [base] Fix mono bitmap presetting (#53896). 4809 4810 It is rather fundamental to set monochrome bitmap based on rounded 4811 CBox because the b/w rasterizer turns on pixels when their centers are 4812 inside the glyph outline. The dropout control is unpredictable and can 4813 distort narrow glyphs if the bitmap is too wide. 4814 4815 Reported by Chris Liddell. 4816 4817 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries 4818 are too close, adjust them before rounding. 4819 48202018-05-15 Werner Lemberg <wl@gnu.org> 4821 4822 [psaux] Fix compiler warning (#53915). 4823 4824 * src/psaux/psft.c (cf2_freeT1SeacComponent): Do it. 4825 48262018-05-15 Werner Lemberg <wl@gnu.org> 4827 4828 [sfnt] Fix memory leak in handling `COLR' data. 4829 4830 * src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array 4831 before reassigning allocated memory. 4832 Only allocate `color_layers' if we don't have one already. 4833 48342018-05-15 Werner Lemberg <wl@gnu.org> 4835 4836 [sfnt] If `COLR' is present, don't assume that all glyphs use it. 4837 4838 * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if 4839 current glyph is not a `COLR' base glyph. 4840 4841 * src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate 4842 `color_layers' if there are no color layers. 4843 48442018-05-14 Werner Lemberg <wl@gnu.org> 4845 4846 * src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'. 4847 48482018-05-14 Werner Lemberg <wl@gnu.org> 4849 4850 Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set. 4851 4852 * src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it. 4853 48542018-05-13 Werner Lemberg <wl@gnu.org> 4855 4856 * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing. 4857 48582018-05-13 Shao Yu Zhang <shaozhang@fb.com> 4859 Werner Lemberg <wl@gnu.org> 4860 4861 [sfnt] Preliminary support of colored layer outlines (#44689). 4862 4863 This commit enables OpenType's COLR/CPAL table handling; a typical 4864 application are color emojis that can be scaled to any size. 4865 4866 If the color palette does not exist or is invalid, the rendering 4867 step rasterizes the outline instead. The current implementation 4868 assumes that the foreground is black. 4869 4870 Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS. 4871 4872 There are still some issues with metrics; additionally, an API to 4873 fetch color layers is missing. 4874 4875 * devel/ftoption.h, include/freetype/config/ftoption.h 4876 (TT_CONFIG_OPTION_COLOR_LAYERS): New macro. 4877 4878 * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec, 4879 FT_Colr_InternalRec): New structures. 4880 (FT_Slot_InternalRec): Add `color_layers' field. 4881 4882 * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func, 4883 TT_Blend_Colr_Func): New function types. 4884 (SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer', 4885 and `colr_blend' fields. 4886 4887 * include/freetype/internal/tttypes.h (TT_FaceRec): Add 4888 `colr_and_cpal' field. 4889 4890 * include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New 4891 macros. 4892 4893 * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files. 4894 4895 * src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal): 4896 Handle glyph color layers. 4897 4898 * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add 4899 `ttcolr.c'. 4900 4901 * src/sfnt/sfdriver.c: Include `ttcolr.h'. 4902 (PUT_COLOR_LAYERS): New macro. 4903 Update call to `FT_DEFINE_SFNT_INTERFACE'. 4904 4905 * src/sfnt/sfnt.c: Include `ttcolr.c'. 4906 4907 * src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables. 4908 (sfnt_done_face): Updated. 4909 4910 * src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers. 4911 49122018-05-12 Arkady Shapkin <arkady.shapkin@gmail.com> 4913 4914 Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636). 4915 4916 * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement 4917 it. 4918 49192018-05-10 Alan Coopersmith <alan.coopersmith@oracle.com> 4920 4921 Fix DLL compilation on Solaris. 4922 4923 AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'. The 4924 Solaris Studio 12.1 through 12.5 compilers see the 4925 `-fvisibility=hidden' flag, but ignore it with a warning of: 4926 4927 cc: Warning: Option -fvisibility=hidden passed to ld, 4928 if ld is invoked, ignored otherwise 4929 4930 AC_LINK_IFELSE does the compile and then tries to link the result, 4931 at which point the Solaris linker will issue an error: 4932 4933 ld: fatal: option '-fvisibility=hidden' is incompatible with 4934 building a dynamic executable 4935 4936 If we don't use AC_LINK_IFELSE to catch the error, then configure 4937 will fail further tests which attempt to link, such as those testing 4938 dependencies like `libbz2'. 4939 4940 Also, don't try adding `-fvisibility' if we have already added 4941 `-xldscope', just use one of them, since Sun Studio 12 and earlier 4942 compilers only issue a warning, and don't try passing through to the 4943 linker to generate an error, so AC_LINK_IFELSE doesn't catch them. 4944 4945 Tested on Solaris 11.4 beta with compiler versions: 4946 4947 Sun Studio 8 (Sun C 5.5) 4948 Sun Studio 10 (Sun C 5.7) 4949 Sun Studio 11 (Sun C 5.8) 4950 Sun Studio 12 (Sun C 5.9) 4951 Sun Studio 12.1 (Sun C 5.10) 4952 Oracle Solaris Studio 12.2 (Sun C 5.11) 4953 Oracle Solaris Studio 12.3 (Sun C 5.12) 4954 Oracle Solaris Studio 12.4 (Sun C 5.13) 4955 Oracle Developer Studio 12.5 (Sun C 5.14) 4956 Oracle Developer Studio 12.6 (Sun C 5.15) 4957 gcc 5.5.0 4958 gcc 7.3.0 4959 4960 and verified the libfreetype.so.6 generated by each of those 4961 compilers exported the same set of symbols. 4962 4963 * builds/unix/configure.raw: Implement it. 4964 49652018-05-08 Werner Lemberg <wl@gnu.org> 4966 4967 [autofit] Avoid potential SEGV if running out of memory. 4968 4969 Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>. 4970 4971 * src/autofit/afshaper.c (af_shaper_buf_create, 4972 af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't 4973 allocate and free a four-byte buffer. Instead, make those functions 4974 no-ops; the calling functions will provide a pointer to a buffer 4975 instead. 4976 4977 * src/autofit/afcjk.c (af_cjk_metrics_init_widths, 4978 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits), 4979 src/autofit/aflatin.c (af_latin_metrics_init_widths, 4980 af_latin_metrics_init_blues, af_latin_metrics_check_digits) 4981 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for 4982 `shaper_buf'. 4983 49842018-05-07 Nikolaus Waxweiler <madigens@gmail.com> 4985 4986 [cmake] Allow using project as subfolder in other project. 4987 4988 * CMakeLists.txt: Test for CMake build directory being different 4989 from source directory. Provide other parts of the build system 4990 access the full include directory. 4991 49922018-05-07 Werner Lemberg <wl@gnu.org> 4993 4994 [build] Suppress configure's `nothing to be done' message. 4995 4996 This is due to calling the configure script via `make' (within the 4997 top-level `configure' wrapper script). The same can happen for all 4998 other secondary make targets that are used to only modify the 4999 primary one, e.g., `make setup devel'. 5000 5001 * builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16), 5002 builds/os2/detect (visualage, watcom, borlandc, devel), 5003 builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk 5004 (visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc, 5005 devel-gcc): Use no-op recipe. 5006 50072018-05-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 5008 5009 Support symbol visibility features of Sun / Oracle C compilers. 5010 5011 Reported by Kiyoshi Kanazawa: 5012 https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html 5013 Thanks to the suggestions by Alexei and Alan Coopersmith. 5014 5015 * builds/unix/configure.raw: Check if "-xldscope=hidden" is 5016 accepted, and if so, it is added to CFLAGS. This is the option 5017 making Sun / Oracle C compilers hide the symbols from global 5018 scope. 5019 * include/freetype/config/ftconfig.h: Use "__global" prefix 5020 for FT_EXPORT() macro, if SunPro C is newer than Sun ONE 5021 Studio 8 (2003). 5022 * builds/unix/ftconfig.in: Ditto. 5023 * builds/vms/ftconfig.h: Ditto. 5024 50252018-05-02 Nikolaus Waxweiler <madigens@gmail.com> 5026 5027 Unbreak CMake Windows installation 5028 5029 * CMakeLists.txt: Generate ftconfig.h on non-UNIX. 5030 50312018-05-02 Werner Lemberg <wl@gnu.org> 5032 5033 Remove FT_CONFIG_OPTION_PIC and related code. 5034 5035 */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this 5036 preprocessor symbol. 5037 5038 */*: Replace `XXX_GET' macros (which could be either a function in 5039 PIC mode or an array in non-PIC mode) with `xxx' arrays. 5040 5041 * include/freetype/internal/ftpic.h, src/autofit/afpic.c, 5042 src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h, 5043 src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h, 5044 src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c, 5045 src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h, 5046 src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c, 5047 src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h: 5048 Removed. 5049 5050 5051---------------------------------------------------------------------------- 5052 5053Copyright (C) 2018-2020 by 5054David Turner, Robert Wilhelm, and Werner Lemberg. 5055 5056This file is part of the FreeType project, and may only be used, modified, 5057and distributed under the terms of the FreeType project license, 5058LICENSE.TXT. By continuing to use, modify, or distribute this file you 5059indicate that you have read the license and understand and accept it 5060fully. 5061 5062 5063Local Variables: 5064version-control: never 5065coding: utf-8 5066End: 5067