12018-01-27 Werner Lemberg <wl@gnu.org> 2 3 [truetype] Better protection against invalid VF data. 4 5 Reported as 6 7 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739 8 9 Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7. 10 11 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize 12 `normalizedcoords'. 13 142018-01-27 Werner Lemberg <wl@gnu.org> 15 16 * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference. 17 18 Reported as 19 20 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736 21 222018-01-27 Werner Lemberg <wl@gnu.org> 23 24 * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor. 25 262018-01-27 Werner Lemberg <wl@gnu.org> 27 28 [truetype] Better trace VF instances. 29 30 * src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number 31 of coordinates. 32 (TT_Get_MM_Var): Trace instance indices names. 33 (TT_Set_Var_Design): Updated. 34 352018-01-27 Werner Lemberg <wl@gnu.org> 36 37 [truetype] Beautify tracing of VF axis records. 38 39 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a 40 table-like manner. 41 422018-01-26 Ben Wagner <bungeman@google.com> 43 44 [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955). 45 46 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Set 47 `face->blend->num_axis' in case we have to initialize the 48 `face->blend'. 49 502018-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> 51 52 [apinames] Anonymous version map for GNU linker. 53 54 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.3. 55 (OutputFormat): Add `OUTPUT_GNU_VERMAP'. 56 (names_dump): Handle it. 57 (usage): Updated. 58 (main): Handle new command line flag `-wL'. 59 602018-01-21 Alexei Podtelezhnikov <apodtele@gmail.com> 61 62 [unix] Call libtool to clean up. 63 64 * builds/unix/install.mk (clean_project_unix, distclean_project_unix): 65 Use libtool. 66 * builds/freetype.mk: Minor. 67 682018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> 69 70 * src/base/ftver.rc: Fix mingw-w64 compilation. 71 722018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> 73 74 [build] Enable VERSIONINFO resource for Cygwin/MinGW. 75 76 * builds/unix/configure.raw: Check for resource compiler. 77 * builds/unix/unix-cc.in: Conditionally set up resource compiler. 78 * builds/freetype.mk: Add conditional rule for `ftver.rc'. 79 * src/base/ftver.rc: Copyright notice and year update. 80 812018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> 82 83 [build] Move VERSIONINFO resource. 84 85 * builds/windows/vc2010/freetype.vcxproj: Updated. 86 * builds/windows/ftver.rc: Move file from here... 87 * src/base/ftver.rc: ... to here. 88 892018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com> 90 91 [build] Expand dllexport/dllimport to Cygwin/MinGW. 92 93 * include/freetype/config/ftconfig.h: Respect DLL_EXPORT, 94 s/_MSC_VER/_WIN32/. 95 * builds/unix/ftconfig.in: Replicate here. 96 * builds/vms/ftconfig.h: Replicate here. 97 982018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com> 99 100 [build] Improve and document MSVC build. 101 102 * include/freetype/config/ftconfig.h: Guard dllexport/dllimport 103 attributes with _DLL and FT2_DLLIMPORT. 104 * builds/windows/vc2010/index.html: Update documentation. 105 1062018-01-10 Steve Robinson <ssrobins@gmail.com> 107 108 * CMakeLists.txt [win32]: Suppress warnings for POSIX functions. 109 1102018-01-10 Ewald Hew <ewaldhew@gmail.com> 111 112 [psaux] Correctly handle Flex features (#52846). 113 114 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO, 115 cf2_cmdHMOVETO>: Do not move if doing Flex. 116 1172018-01-09 Alexei Podtelezhnikov <apodtele@gmail.com> 118 119 * builds/windows/vc2010/freetype.sln: Synchronize with the project. 120 1212018-01-08 Werner Lemberg <wl@gnu.org> 122 123 * Version 2.9 released. 124 ======================= 125 126 127 Tag sources with `VER-2-9'. 128 129 * docs/VERSION.TXT: Add entry for version 2.9. 130 131 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, 132 builds/windows/vc2005/index.html, 133 builds/windows/vc2008/freetype.vcproj, 134 builds/windows/vc2008/index.html, 135 builds/windows/vc2010/freetype.vcxproj, 136 builds/windows/vc2010/index.html, 137 builds/windows/visualc/freetype.dsp, 138 builds/windows/visualc/freetype.vcproj, 139 builds/windows/visualc/index.html, 140 builds/windows/visualce/freetype.dsp, 141 builds/windows/visualce/freetype.vcproj, 142 builds/windows/visualce/index.html, 143 builds/windows/ftver.rc, 144 builds/wince/vc2005-ce/freetype.vcproj, 145 builds/wince/vc2005-ce/index.html, 146 builds/wince/vc2008-ce/freetype.vcproj, 147 builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/. 148 149 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9. 150 (FREETYPE_PATCH): Set to 0. 151 152 * builds/unix/configure.raw (version_info): Set to 22:0:16. 153 * CMakeLists.txt (VERSION_PATCH): Set to 1. 154 1552018-01-07 Werner Lemberg <wl@gnu.org> 156 157 Add check for librt, needed for `ftbench' (#52824). 158 159 * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will 160 hold `-lrt' if necessary. 161 162 * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable. 163 1642018-01-07 Ewald Hew <ewaldhew@gmail.com> 165 166 [psaux] Fix Type 1 glyphs with too many stem hints. 167 168 According to the CFF specification, charstrings can have up to 96 stem 169 hints. Due to hint replacement routines in Type 1 charstrings, some 170 glyphs are rejected by the Adobe engine, which implements the above 171 limit. This fix turns off hinting for such glyphs. 172 173 * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling 174 `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off 175 hinting. 176 1772018-01-06 Werner Lemberg <wl@gnu.org> 178 179 Add `FT_Done_MM_Var'. 180 181 This is necessary in case the application's memory routines differ 182 from FreeType. A typical example is a Python application on Windows 183 that calls FreeType compiled as a DLL via the `ctypes' interface. 184 185 * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare 186 and define. 187 188 * docs/CHANGES: Updated. 189 1902018-01-03 Werner Lemberg <wl@gnu.org> 191 192 [truetype] Round offsets of glyph components only if hinting is on. 193 194 * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement 195 it. 196 1972018-01-03 Werner Lemberg <wl@gnu.org> 198 199 * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code. 200 201 This is a better fix than the previous commit, which is now 202 reverted. 203 2042018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com> 205 206 Move internal LCD-related declarations. 207 208 * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir): 209 Move from here... 210 * include/freetype/internal/ftobjs.h: ... to here. 211 2122018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com> 213 214 * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) 215 [_MSC_VER]: Limit Visual C++ attributes. 216 2172018-01-03 Werner Lemberg <wl@gnu.org> 218 219 [truetype] Make blend/design coordinate round-tripping work. 220 221 Behdad reported that setting blend coordinates, then getting design 222 coordinates did incorrectly return the default instance's 223 coordinates. 224 225 * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it. 226 2272017-12-31 Werner Lemberg <wl@gnu.org> 228 229 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop. 230 231 Reported as 232 233 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838 234 2352017-12-31 Werner Lemberg <wl@gnu.org> 236 237 Synchronize other Windows project files. 238 239 * builds/windows/*: Add missing files. 240 2412017-12-31 Werner Lemberg <wl@gnu.org> 242 243 Update Visual C 2010 project files. 244 245 Problem reported by Hin-Tak. 246 247 * builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and 248 `ftcid.c'. 249 Sort entries. 250 * builds/windows/vc2010/freetype.vcxproj.filter: Ditto. 251 Fix members of `FT_MODULE' group. 252 2532017-12-30 Werner Lemberg <wl@gnu.org> 254 255 * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file. 256 2572017-12-28 Werner Lemberg <wl@gnu.org> 258 259 * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file. 260 261 Reported by Nikolaus. 262 2632017-12-27 Werner Lemberg <wl@gnu.org> 264 265 Fix compiler warnings. 266 267 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and 268 `new_pitch' unsigned. 269 270 * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H. 271 2722017-12-27 Werner Lemberg <wl@gnu.org> 273 274 Fixes for `make multi'. 275 276 * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'. 277 (ps_property_get): Harmonize declaration with corresponding 278 function typedef. 279 280 * include/freety[e/internal/fttrace.h: Add `trace_psprops'. 281 282 * src/base/ftpsprop.c: Include necessary header files. 283 (FT_COMPONENT): Define. 284 (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'. 285 (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'. 286 Harmonize declaration with corresponding function typedef. 287 2882017-12-27 Werner Lemberg <wl@gnu.org> 289 290 Provide support for intra-module callback functions. 291 292 This is needed especially for `make multi' with C++. 293 294 * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK, 295 FT_BASE_CALLBACK_DEF): New macros. 296 2972017-12-25 Ewald Hew <ewaldhew@gmail.com> 298 299 Move PostScript drivers' property handlers to `base'. 300 301 This reduces the amount of duplicated code across PostScript 302 drivers. 303 304 * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c 305 ({cff,cid,t1}_property_{get,set}): Moved to... 306 * include/freetype/internal/ftpsprop.h: ...this new file. 307 (ps_property_{get,set}): New functions to replace moved ones. 308 309 * src/base/ftpsprop.c: New file that implements above functions. 310 311 * include/freetype/internal/internal.h 312 (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro. 313 314 * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c: 315 Updated. 316 317 * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c: 318 Updated. 319 3202017-12-20 Werner Lemberg <wl@gnu.org> 321 322 Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new. 323 324 We exit early if the current design or blend coordinates are 325 identical to the new ones. 326 327 * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design): 328 Implement it, returning internal error code -1 if there will be no 329 variation change. 330 331 * src/type1/t1load.c (t1_set_mm_blend): Ditto. 332 333 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, 334 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated. 335 3362017-12-18 Werner Lemberg <wl@gnu.org> 337 338 [sfnt] Fix charmap type 2 iterator (#52646). 339 340 The subsetted demo font of the report that exhibits the bug has a 341 very unusual type 2 cmap for Unicode(!): It contains only two 342 sub-headers, one for one-byte characters (covering the range 0x20 to 343 0xFA), and a second one for higher byte 0x01 (just for character 344 code U+0131). 345 346 Before this commit, the iterator wasn't able to correctly handle a 347 sub-header for higher byte 0x01. 348 349 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment 350 for outer loop. 351 3522017-12-18 Matthias Clasen <matthias.clasen@gmail.com> 353 354 [truetype] Fix clamping, minor tracing code beautification. 355 356 * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of 357 design coordinates. 358 Use clamped value. 359 3602017-12-18 Werner Lemberg <wl@gnu.org> 361 362 * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff. 363 3642017-12-18 Werner Lemberg <wl@gnu.org> 365 366 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688). 367 3682017-12-18 Werner Lemberg <wl@gnu.org> 369 370 [truetype] Fix previous commit. 371 372 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle 373 unhinted phantom points, which must be properly scaled. 374 3752017-12-18 Werner Lemberg <wl@gnu.org> 376 377 [truetype] Don't apply HVAR and VVAR deltas twice (#52683). 378 379 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust 380 `pp1' to `pp4', except if we have an HVAR and/or VVAR table. 381 382 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle 383 alternative code branch identically w.r.t. presence of an HVAR 384 and/or VVAR table. 385 3862017-12-17 Jonathan Kew <jfkthame@gmail.com> 387 388 [truetype] Correctly handle variation font phantom points (#52683). 389 390 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom 391 point indices. 392 3932017-12-17 Jonathan Kew <jfkthame@gmail.com> 394 395 Fix incorrect advance width scaling (#52683). 396 397 * src/base/ftadvance.c (FT_Get_Advances): Always respect the 398 FT_LOAD_NO_SCALE flag if present. 399 4002017-12-16 Alexei Podtelezhnikov <apodtele@gmail.com> 401 402 * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy. 403 * objs/.gitignore: Ignore almost everything. 404 4052017-12-11 Werner Lemberg <wl@gnu.org> 406 407 Fix compiler warning (#52640). 408 409 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused 410 variable. 411 4122017-12-08 Azzuro <azzuro@team-mediaportal.com> 413 414 * builds/windows/vc2010/freetype.vcxproj: Adjust output directory. 415 416 This allows builds with different configurations in parallel. 417 4182017-12-08 Werner Lemberg <wl@gnu.org> 419 420 Fix `make setup dos', second try (#52622). 421 422 * builds/detect.mk (dos_setup): Don't use literal `>' character at 423 all. Mixing the different escaping rules from make, dos, and 424 windows is too fragile. 425 4262017-12-08 Werner Lemberg <wl@gnu.org> 427 428 [docmaker] Fix code section parsing. 429 430 Stuff like 431 432 { 433 <bla> 434 } 435 436 confused the parser, which incorrectly treated `<bla>' as a markup 437 tag. 438 439 * src/tools/docmaker/content.py (ContentProcessor::process_content): 440 Apply `re_markup_tags' only outside of code sections. 441 4422017-12-08 Werner Lemberg <wl@gnu.org> 443 444 New `ftdriver.h' file, covering all driver modules. 445 446 This reduces redundancy and increases synergy; it also reduces the 447 number of header files. 448 449 * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro. 450 (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H, 451 FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to 452 FT_DRIVER_H. 453 454 * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, 455 include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h, 456 include/freetype/ftttdrv.h: Replaced with... 457 * include/freetype/ftdriver.h: ...this new file. 458 (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to... 459 (FT_HINTING_ADOBE): ... this new macro. 460 (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to... 461 (FT_HINTING_FREETYPE): ... this new macro. 462 463 * src/*/*: Updated accordingly. 464 4652017-12-08 Werner Lemberg <wl@gnu.org> 466 467 Move `ftdriver.h' to `ftdrv.h'. 468 469 * include/freetype/internal/ftdriver.h: Renamed to... 470 * include/freetype/internal/ftdrv.h: ... this name. 471 472 * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H): 473 Updated. 474 4752017-12-08 Werner Lemberg <wl@gnu.org> 476 477 Fix access to uninitalized memory (#52613). 478 479 Also reported as 480 481 https://bugs.chromium.org/p/chromium/issues/detail?id=791317 482 483 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the 484 bitmap size needs a larger bitmap buffer, assure that the new memory 485 areas are initialized also. 486 4872017-12-08 Werner Lemberg <wl@gnu.org> 488 489 Fix `make setup dos' (#52622). 490 491 * builds/detect.mk (dos_setup): Properly escape literal `>' 492 character. 493 4942017-12-07 Werner Lemberg <wl@gnu.org> 495 496 Fix C++ compilation. 497 498 * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary. 499 500 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning. 501 5022017-12-07 Werner Lemberg <wl@gnu.org> 503 504 Fix `make multi'. 505 506 * include/freetype/internal/fttrace.h: Remove unused tracing macros. 507 s/pshalgo2/pshalgo/. 508 Add `trace_cffdecode'. 509 * src/pshinter/pshalgo.c (FT_COMPONENT): Updated. 510 511 * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. 512 * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and 513 FT_SERVICE_CFF_TABLE_LOAD_H. 514 515 * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. 516 517 * src/psaux/cffdecode.c: Include FT_FREETYPE_H and 518 FT_INTERNAL_DEBUG_H. 519 (FT_COMPONENT): Define. 520 * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. 521 * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. 522 Declare `cff_builder_funcs' and `ps_builder_funcs'. 523 * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'. 524 * src/psaux/psobjs.c : Include `psauxmod.h'. 525 5262017-12-07 Werner Lemberg <wl@gnu.org> 527 528 * include/freetype/config/ftheader.h: Some clean-up. 529 530 This commit removes documentation of deprecated macros and does some 531 minor streamlining. 532 5332017-12-06 Werner Lemberg <wl@gnu.org> 534 535 * builds/symbian/bld.inf: Updated. 536 5372017-12-06 Werner Lemberg <wl@gnu.org> 538 539 New header file `ftparams.h' that collects all parameter tags. 540 541 * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New 542 macro. 543 (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to 544 `ftparams.h'. 545 546 * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, 547 include/freetype/ftincrem.h, include/freetype/ftlcdfil.h, 548 include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include 549 FT_PARAMETER_TAGS_H. 550 Move FT_PARAM_TAG_XXX definitions to... 551 * include/freetype/ftparams.h: ...this new file. 552 553 * include/freetype/ttunpat.h: Remove. No longer needed. 554 5552017-12-05 Werner Lemberg <wl@gnu.org> 556 557 Improve tracing messages by using singular and plural forms. 558 559 * src/*/*.c: Implement it. 560 5612017-12-04 Werner Lemberg <wl@gnu.org> 562 563 [truetype] Allow shared points in `cvar' table (#52532). 564 565 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying 566 and adjusting the corresponding code from 567 `TT_Vary_Apply_Glyph_Deltas'. 568 5692017-11-28 Werner Lemberg <wl@gnu.org> 570 571 [truetype] Improving tracing of composite glyphs. 572 573 * src/truetype/ttgload.c (TT_Load_Composite_Glyph) 574 [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information. 575 5762017-11-27 Werner Lemberg <wl@gnu.org> 577 578 [type1] Allow (again) `/Encoding' with >256 elements (#52464). 579 580 In version 2.6.1, this has been disallowed to better reject 581 malformed fonts; however, this restriction was too strong. This 582 time, we only take the first 256 elements into account, since 583 encoding arrays are always accessed with a 8bit integer, according 584 to the PostScript Language Reference. 585 586 * src/type1/t1load.c (parse_encoding): Implement it. 587 5882017-11-27 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> 589 590 Fix last commit (#52522). 591 592 * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG' 593 properly if we have `ftoption.h' in `BUILD_DIR'. 594 5952017-11-24 Werner Lemberg <wl@gnu.org> 596 597 [unix] Install a massaged `ftoption.h' file (#51780). 598 599 * builds/unix/configure.raw (ftoption_set, ftoption_unset): New 600 auxiliary functions to construct... 601 (FTOPTION_H_SED): ... this new variable. 602 Apply it as a sed argument while copying `ftoption.h' to the 603 `builds/unix' directory (using `AC_CONFIG_FILES'). 604 Simplify code of test that checks cpp's computation of bit length 605 (the test previously created an empty `ftoption.h' file and deleted 606 it immediately afterwards); without this change, it can happen on my 607 GNU/Linux box that `configure's execution of `config.status' doesn't 608 create `ftoption.h' (no idea why this happens). 609 610 * builds/unix/install.mk (install): Install 611 `builds/unix/ftoption.h'. 612 613 * builds/unix/unix-def.in (DISTCLEAN): Updated. 614 615 * builds/unix/.gitignore: Updated. 616 6172017-11-23 Tor Andersson <tor.andersson@artifex.com> 618 619 Silence unused function warnings (#52465). 620 621 Some static function declarations cause unused function warnings if 622 certain config options are turned off via `ftoption.h'. 623 624 * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h, 625 src/truetype/ttgxvar.h: Add #ifdef guards around these sections. 626 6272017-11-22 Ewald Hew <ewaldhew@gmail.com> 628 629 * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting. 630 631 Reported as 632 633 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377 634 6352017-11-22 Ewald Hew <ewaldhew@gmail.com> 636 637 [psaux] Fix CFF advance widths. (#52466) 638 639 Glyph advance widths were being written to the new `PS_Decoder' but not 640 saved to the underlying format specific decoder. This caused pure CFF 641 fonts to have bad advance width. 642 643 * include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width' 644 field to pointer. 645 Remove unused fields. 646 * src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy 647 to reference. 648 Remove unused. 649 * src/psaux/psft.c (cf2_setGlyphWidth): Update code. 650 6512017-11-15 Vlad Tsyrklevich <vtsyrklevich@google.com> 652 653 * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type. 654 6552017-11-14 Nikolaus Waxweiler <madigens@gmail.com> 656 657 Use Adobe hinting engine for `light' hinting of both CFF and Type 1. 658 659 Since Ewald Hew factored the Adobe hinting engine out of the CFF 660 driver code, we can now use it on Type 1 (and CID) font formats, as 661 both have the same hinting philosophy. 662 663 This change activates the Adobe hinter when in LIGHT mode, and 664 therefore always unless explicitly asking for the auto-hinter. This 665 makes LIGHT behavior consistent with CFF fonts. As of this commit, 666 the hinting engine table looks as follows. 667 668 LIGHT NORMAL 669 ------------------------- 670 TrueType Auto v40 671 CFF Adobe Adobe 672 Type 1 Adobe Adobe 673 6742017-11-10 Yuri Levchenko <yuri_levchenko@boolat.com> 675 676 * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option. 677 6782017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com> 679 680 * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition. 681 6822017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com> 683 684 * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables. 685 6862017-11-03 Ewald Hew <ewaldhew@gmail.com> 687 688 [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251) 689 690 The interpreter in Type 1 mode rewinds the charstring after collecting 691 all hints for building the initial hintmap (commit d52dd7f). However, 692 some charstrings use `endchar' in a final subroutine call, rewinding to 693 the start of that subroutine, and only a small section of the actual 694 glyph is drawn. 695 696 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>: 697 Ensure we are on the top level charstring before rewinding. 698 6992017-11-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 700 701 [truetype] Add more tricky fonts. 702 703 See the report by Yang Yinsen. 704 https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html 705 706 * src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB', 707 `DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'. 708 (tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB, 709 DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7. Also 710 add checksums for DLCLiShu and DLCHayBold which their family names 711 were already listed but their checksums were previously unknown. 712 7132017-11-01 Alexei Podtelezhnikov <apodtele@gmail.com> 714 715 [smooth] Fix complex rendering at high ppem. 716 717 We used to split large glyphs into horizontal bands and continue 718 bisecting them still horizontally if that was not enough. This is 719 guaranteed to fail when a single scanline cannot fit into the 720 rendering memory pool. Now we bisect the bands vertically so that 721 the smallest unit is a column of the band height, which is guranteed 722 to fit into memory. 723 724 * src/smooth/ftgrays.c (gray_convert_glyph): Implement it. 725 7262017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com> 727 728 [smooth] Improve complex rendering at high ppem. 729 730 At large sizes almost but not exactly horizontal segments can quickly 731 drain the rendering pool. This patch at least avoids filling the pool 732 with trivial cells. Beyond this, we can only increase the pool size. 733 734 Reported, analyzed, and tested by Colin Fahey. 735 736 * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells. 737 7382017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com> 739 740 [base] Improve tracing in FT_Load_Glyph, FT_*_Size. 741 742 * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with 743 function name, glyph index, and load flags. 744 (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing. 745 (FT_Select_Size, FT_Request_Size): Improve tracing. 746 7472017-10-18 Alexei Podtelezhnikov <apodtele@gmail.com> 748 749 [base] Improve tracing in FT_Render_Glyph. 750 751 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage 752 calculations and downgrade Netpbm dump to bitmap:7. 753 7542017-10-15 Ewald Hew <ewaldhew@gmail.com> 755 756 [cff] Fix segfault on missing `psaux' (#52218) 757 758 * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr. 759 760 * modules.cfg: Update dependency list. 761 7622017-10-15 Alexei Podtelezhnikov <apodtele@gmail.com> 763 764 [base, cff] Fix MSVC warnings. 765 766 * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code. 767 (ft_glyphslot_preset_bitmap): C4244: possible loss of data. 768 * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data. 769 Turn `sum' into unsigned. 770 7712017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com> 772 773 [base] Netpbm image tracing. 774 775 * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size. 776 (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format. 777 778 * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing. 779 7802017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com> 781 782 * builds/windows/ftdebug.c (FT_Message): Print to stderr. 783 * builds/wince/ftdebug.c (FT_Message): Ditto. 784 7852017-10-14 Behdad Esfahbod <behdad@behdad.org> 786 787 [afshaper] Delay creating `hb_set' objects until needed. 788 789 In runs on Noto Naskh Arabic, this results in 89 sets created 790 instead of 340 before. Makes auto-hinter setup with HarfBuzz 791 enabled 20% to 30% faster. 792 793 * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it. 794 7952017-10-12 Ewald Hew <ewaldhew@gmail.com> 796 797 [type1, cid] Add hinting engine switch. 798 799 Implement property service in `type1' and `cid' drivers to allow 800 switching between FreeType or Adobe hinting engine when both are 801 available. 802 803 * src/cid/cidriver.c (cid_property_{set,get}, cid_services), 804 src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add 805 Properties service. 806 807 * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c 808 (T1_Driver_Init): Add default property values. 809 8102017-10-12 Ewald Hew <ewaldhew@gmail.com> 811 812 Add T1_CONFIG_OPTION_OLD_ENGINE configuration option. 813 814 This controls whether the old Type 1 engine gets compiled into FreeType. 815 It is disabled by default. 816 817 * devel/ftoption.h, include/freetype/config/ftoption.h 818 (T1_CONFIG_OPTION_OLD_ENGINE): New macro. 819 820 * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field. 821 * include/freetype/internal/psaux.h, src/cid/cidgload.c 822 (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c 823 (ps_builder_add_point), src/psaux/t1decode.c 824 (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph, 825 t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h, 826 src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround 827 relevant code with macro. 828 Minor code changes. 829 8302017-10-12 Ewald Hew <ewaldhew@gmail.com> 831 832 Extract width parsing from Type 1 parser. 833 834 Duplicate the fast advance width calculations from the old parser. 835 This is to facilitate adding options for compiling out the old parser. 836 837 * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function. 838 * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry 839 `parse_metrics'. 840 * src/psaux/psauxmod.c: Set the new entry. 841 842 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String), 843 src/cid/cidgload.c (cid_load_glyph): Separate 844 conditional for selecting engine. 845 8462017-10-09 Werner Lemberg <wl@gnu.org> 847 848 * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow. 849 850 Reported as 851 852 https://bugs.chromium.org/p/chromium/issues/detail?id=772775 853 8542017-10-08 Werner Lemberg <wl@gnu.org> 855 856 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows. 857 858 Reported as 859 860 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579 861 8622017-10-07 Werner Lemberg <wl@gnu.org> 863 864 [sfnt] Adjust behaviour of PS font names for variation fonts. 865 866 * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's 867 PS name only if no variation is applied. 868 8692017-10-07 Werner Lemberg <wl@gnu.org> 870 871 [cff, truetype] Adjust behaviour of named instances. 872 873 This commit completely separates the interaction between named 874 instances and variation functions. In particular, resetting the 875 variation returns to the current named instance (if set) and not to 876 the base font. 877 878 As a side effect, variation functions no longer change the named 879 instance index. 880 881 * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance' 882 function. 883 Also apply `MVAR' table to named instances. 884 885 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast. 886 (tt_set_mm_blend): No longer check whether requested variation 887 coincides with a named instance. 888 (TT_Set_Var_Design): Use current named instance for default 889 coordinates. 890 * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'. 891 8922017-10-07 Werner Lemberg <wl@gnu.org> 893 894 Make `FT_Set_Named_Instance' work. 895 896 * src/cff/cffdrivr.c (cff_set_instance): New function. 897 (cff_service_multi_masters): Register it. 898 899 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function. 900 * src/truetype/ttgxvar.h: Updated. 901 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register 902 it. 903 904 * src/type1/t1load.c (T1_Reset_MM_Blend): New function. 905 * src/type1/t1load.h: Updated. 906 * src/type1/t1driver.c (t1_service_multi_masters): Register it. 907 9082017-10-07 Werner Lemberg <wl@gnu.org> 909 910 Make `FT_FACE_FLAG_VARIATION' work. 911 912 * include/freetype/internal/tttypes.h (TT_Face): Remove 913 `is_default_instance'; this can be replaced with a combination of 914 `FT_IS_VARIATION' and `FT_IS_INSTANCE'. 915 916 * src/cff/cffdrivr.c (cff_get_advances): Updated. 917 918 * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c 919 (sfnt_init_face): Updated. 920 921 * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c 922 (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE), 923 src/truetype/ttgxvar.c (tt_set_mm_blend): Updated. 924 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): 925 Handle `FT_FACE_FLAG_VARIATION'. 926 927 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle 928 `FT_FACE_FLAG_VARIATION'. 929 9302017-10-07 Werner Lemberg <wl@gnu.org> 931 932 New function `FT_Set_Named_Instance'. 933 934 No effect yet. 935 936 * src/base/ftmm.c (FT_Set_Named_Instance): New function. 937 938 * include/freetype/ftmm.h: Updated. 939 9402017-10-07 Werner Lemberg <wl@gnu.org> 941 942 Add macros for checking whether a font variation is active. 943 944 * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION, 945 FT_IS_VARIATION): New macros. 946 No effect yet. 947 9482017-10-07 Werner Lemberg <wl@gnu.org> 949 950 Add framework for setting named instance in MM service. 951 952 * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): 953 New function typedef. 954 (MultiMasters): Add `set_instance' member. 955 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. 956 957 * src/cff/cffdrivr.c (cff_service_multi_masters), 958 src/truetype/ttdriver (tt_service_gx_multi_masters), 959 src/type1/t1driver.c (t1_service_multi_masters): Updated. 960 9612017-10-07 Werner Lemberg <wl@gnu.org> 962 963 [type1] Minor code shuffling. 964 965 * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of... 966 (t1_set_mm_blend): ...this new function. 967 (T1_Set_MM_Design): Use `t1_set_mm_blend'. 968 9692017-10-05 Werner Lemberg <wl@gnu.org> 970 971 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer 972 overflow. 973 974 Reported as 975 976 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539 977 9782017-10-05 Werner Lemberg <wl@gnu.org> 979 980 Fix compiler warnings. 981 982 * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies 983 on numeric overflow. 984 Add cast. 985 986 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable 987 types, add cast. 988 9892017-10-04 John Tytgat <John.Tytgat@esko.com> 990 991 [cff] Add support for `FSType'. 992 993 * include/freetype/internal/cfftypes.h (CFF_FontRec): Add 994 `font_extra' entry. 995 996 * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to 997 retrieve FSType info from the embedded PostScript data. 998 (cff_service_ps_info): Register function. 999 1000 * src/cff/cffload.c (cff_font_done): Free `font_extra'. 1001 10022017-09-30 Alexei Podtelezhnikov <apodtele@gmail.com> 1003 1004 Signedness fixes in bitmap presetting. 1005 1006 Reported as 1007 1008 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514. 1009 1010 * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height. 1011 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. 1012 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned 1013 subtraction. 1014 10152017-09-29 Alexei Podtelezhnikov <apodtele@gmail.com> 1016 1017 Bitmap metrics presetting [2/2]. 1018 1019 * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when 1020 appropriate but `FT_Render_Glyph' is not called. 1021 * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change. 1022 10232017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com> 1024 1025 [smooth, raster] Miscellaneous cleanups. 1026 1027 * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit. 1028 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce 1029 translations and clean up the exit. 1030 (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'. 1031 10322017-09-28 Ben Wagner <bungeman@google.com> 1033 1034 [truetype] Really, really fix #52082. 1035 1036 * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. 1037 10382017-09-28 Werner Lemberg <wl@gnu.org> 1039 1040 * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow. 1041 1042 Reported as 1043 1044 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510 1045 10462017-09-28 Ewald Hew <ewaldhew@gmail.com> 1047 1048 * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak. 1049 1050 Reported as 1051 1052 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489 1053 10542017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com> 1055 1056 Bitmap metrics presetting [1/2]. 1057 1058 This mainly just extracts the code for presetting the bitmap metrics 1059 from the monochrome, grayscale, and LCD renderers into a separate 1060 function. 1061 1062 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that 1063 calculates prospective bitmap metrics for the given rendering mode. 1064 * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): 1065 Declare it. 1066 1067 * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds 1068 padding to CBox taking into account pecularities of LCD rendering. 1069 * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it. 1070 1071 * src/raster/ftrend1.c (ft_raster1_render): Reworked to use 1072 `ft_glyphslot_preset_bitmap'. 1073 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. 1074 (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting 1075 is moved to `ft_glyphslot_preset_bitmap'. 1076 10772017-09-28 Ewald Hew <ewaldhew@gmail.com> 1078 1079 [psaux] Fix compiler warning. 1080 1081 * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing 1082 code. 1083 10842017-09-27 Werner Lemberg <wl@gnu.org> 1085 1086 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. 1087 10882017-09-25 Werner Lemberg <wl@gnu.org> 1089 1090 [psaux] Fix compiler warnings. 1091 1092 * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant 1093 test. 1094 1095 * src/psaux/psintrp.c (cf2_interpT2CharString) 1096 <cf2_escCALLOTHERSUBR>: Add casts. 1097 1098 * src/psaux/psobjs.c (ps_decoder_init): Add cast. 1099 11002017-09-25 Ewald Hew <ewaldhew@gmail.com> 1101 1102 [psaux] Minor fixes. 1103 1104 * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}: 1105 Rearrange `ps_builder_init' arguments to conventional order. 1106 1107 * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and 1108 notice for `SubFont' in Type 1 mode. 1109 11102017-09-25 Ewald Hew <ewaldhew@gmail.com> 1111 1112 [psaux] Move `psdecode' into `psobjs'. 1113 1114 As the former only contains a single procedure, move it into 1115 `psobjs' for simplicity. Also change the parameter order to the 1116 conventional one. 1117 1118 * src/psaux/psdecode.c (ps_decoder_init): Moved to... 1119 * src/psaux/psobjs.c: ...Here. 1120 * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto. 1121 1122 * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update 1123 `ps_decoder_init' function signature. 1124 1125 * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c: 1126 Update calls. 1127 1128 * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes. 1129 1130 * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC): 1131 Update file references. 1132 11332017-09-25 Ewald Hew <ewaldhew@gmail.com> 1134 1135 [psaux] Fix Type 1 hinting. 1136 1137 Type 1 hinting breaks sometimes when mid-charstring hints should 1138 have been in the initial hintmap. This fix adds a preprocessing 1139 pass that reads all hints and builds the correct initial hintmap 1140 first, before proceeding to build the glyph outline. 1141 1142 * src/psaux/psintrp.c (cf2_interpT2CharString): New 1143 `initial_map_ready' boolean flag. 1144 Ignore outline commands and hint changes on first pass. 1145 <cf2_cmdENDCHAR>: Add section to build hintmap and rewind. 1146 11472017-09-25 Ewald Hew <ewaldhew@gmail.com> 1148 1149 [psaux] Add tracing for hints. 1150 1151 * src/psaux/pshints.c (cf2_hintmap_dump): New function. 1152 (cf2_hintmap_insertHint): Trace incoming and inserted hints. 1153 (cf2_hintmap_build): Dump hintmap before and after hint adjustment. 1154 11552017-09-25 Ewald Hew <ewaldhew@gmail.com> 1156 1157 [psaux] Minor fixes. 1158 1159 * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop 1160 results. 1161 s/font->decoder/decoder/ where necessary. 1162 <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_escHSTEM3, cf2_escVSTEM3>: Use 1163 offset parameter in `cf2_doStems' instead of doing correction for 1164 left-sidebearing. 1165 11662017-09-25 Ewald Hew <ewaldhew@gmail.com> 1167 1168 [cid] Use the new engine. 1169 1170 * src/cid/cidgload.c: Update includes. 1171 (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph 1172 loading code as with `type1' module. 1173 11742017-09-25 Ewald Hew <ewaldhew@gmail.com> 1175 1176 [cid] Add Adobe engine configuration. 1177 1178 This is similar to what was done in the `type1' module. 1179 1180 * src/cid/cidriver.c (t1cid_driver_class): Update declaration. 1181 * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H. 1182 (cid_driver_init): Update code. 1183 11842017-09-25 Ewald Hew <ewaldhew@gmail.com> 1185 1186 [psaux] Change subfont synthesis for CID fonts. 1187 1188 Change `t1_make_subfont' to take in the Private dict record as an 1189 argument. This is because Type 1 and CID font records in FreeType 1190 have this in different places. 1191 1192 * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to 1193 `FT_Face' so that CID is also accepted. 1194 Take `PS_Private' as an argument and let caller figure out where the 1195 Private dict actually is. 1196 Update references. 1197 1198 * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update 1199 declaration. 1200 1201 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update 1202 call. 1203 12042017-09-25 Ewald Hew <ewaldhew@gmail.com> 1205 1206 [type1] Switch to Adobe engine. 1207 1208 * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine. 1209 12102017-09-25 Ewald Hew <ewaldhew@gmail.com> 1211 1212 [psaux] Extend Adobe interpreter (seac). 1213 1214 This concludes the changes needed to add Type 1 support. 1215 1216 * src/psaux/psintrp.c: Update includes. 1217 (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to 1218 implied seac for CFF. 1219 1220 * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New 1221 function to look up the glyph index. 1222 1223 * src/psaux/psft.c (cf2_getT1SeacComponent, 1224 cf2_freeT1SeacComponent): New functions to get the charstrings for 1225 seac components. 1226 1227 * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations. 1228 12292017-09-25 Ewald Hew <ewaldhew@gmail.com> 1230 1231 [psaux] Extend Adobe interpreter (flex in callothersubr). 1232 1233 * src/psaux/psintrp.c (cf2_interpT2CharString) 1234 <cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1, 1235 2). 1236 <cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing 1237 flex. This is to avoid closing the current contour. 1238 12392017-09-25 Ewald Hew <ewaldhew@gmail.com> 1240 1241 [psaux] Extend Adobe interpreter (callothersubr). 1242 1243 * src/psaux/psintrp.c (cf2_interpT2CharString) 1244 <cf2_escCALLOTHERSUBR>: Copy code from 1245 `t1_decoder_parse_charstrings' (in `t1decode.c'). 1246 OtherSubr 3 (change hints) should reset the hintmask, so that the 1247 new hints are applied. 1248 Fix function calls and stack access. 1249 12502017-09-25 Ewald Hew <ewaldhew@gmail.com> 1251 1252 [psaux] Extend Adobe interpreter (pop). 1253 1254 * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled 1255 OtherSubr results are stored. Implement the PostScript stack using 1256 an array. 1257 <cf2_escPOP>: Ensure that the stack is not cleared after getting 1258 `OtherSubr' results. 1259 Fix stack access. 1260 12612017-09-25 Ewald Hew <ewaldhew@gmail.com> 1262 1263 [psaux] Extend Adobe interpreter (callsubr). 1264 1265 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>: 1266 Type 1 mode. 1267 1268 * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode. 1269 12702017-09-25 Ewald Hew <ewaldhew@gmail.com> 1271 1272 [psaux] Extend Adobe interpreter (div, four-byte numbers). 1273 1274 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add 1275 Type 1 mode. Type 1 requires large integers to be followed by 1276 `div'; cf. `Adobe Type 1 Font Format', section 6.2. 1277 <op == 255>: Push Type 1 four-byte numbers as `Int' always. This is 1278 to ensure `div' and `callsubr' get values they can use. 1279 12802017-09-25 Ewald Hew <ewaldhew@gmail.com> 1281 1282 [psaux] Extend Adobe interpreter (hints). 1283 1284 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, 1285 cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode. 1286 Allow adding hints mid-charstring. 1287 <cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands 1288 for three normal stem hints. This requires some recalculation of 1289 stem positions. 1290 Correction for left sidebearing. 1291 12922017-09-25 Ewald Hew <ewaldhew@gmail.com> 1293 1294 [psaux] Extend Adobe interpreter (hsbw, sbw). 1295 1296 * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the 1297 first operation in a Type 1 charstring. 1298 (cf2_interpT2CharString): Remove unused variables. 1299 <cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw' 1300 must be the first operation in a Type 1 charstring. 1301 <cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for 1302 left sidebearing. 1303 13042017-09-25 Ewald Hew <ewaldhew@gmail.com> 1305 1306 [psaux] Extend Adobe interpreter (setcurrentpoint). 1307 1308 * src/psaux/psintrp.c (cf2_interpT2CharString) 1309 <cf2_escSETCURRENTPT>: Fix stack access. 1310 13112017-09-25 Ewald Hew <ewaldhew@gmail.com> 1312 1313 [psaux] Extend Adobe interpreter (closepath). 1314 1315 * src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>: 1316 Use the right builder function. We can use the `haveWidth' boolean 1317 already present, instead of implementing `parse_state'. 1318 13192017-09-25 Ewald Hew <ewaldhew@gmail.com> 1320 1321 [psaux] Add Type 1 operations to Adobe CFF interpreter. 1322 1323 The following Type 1 specific ops have been added (copied from 1324 `t1decode'): 1325 1326 closepath 1327 vstem3 1328 hstem3 1329 seac 1330 sbw 1331 callothersubr 1332 pop 1333 setcurrentpoint 1334 hsbw 1335 1336 The following require a Type 1 mode, because of differences in 1337 specification: 1338 1339 hstem 1340 vstem 1341 vmoveto 1342 callsubr 1343 div 1344 rmoveto 1345 hmoveto 1346 Numbers 1347 1348 The subsequent commits will implement these changes and adapt 1349 accesses of data and objects to the new interpreter. 1350 1351 NOTE: Will not compile in the meantime! 1352 1353 * src/psaux/psintrp.c: Add opcodes to enum. 1354 (cf2_interpT2CharString): Copy relevant code over from 1355 `t1_decoder_parse_charstrings' (in `t1decode.c'). 1356 13572017-09-25 Ewald Hew <ewaldhew@gmail.com> 1358 1359 [type1] Fixes for rendering. 1360 1361 The Type 1 advance width calculation passes null for glyph slot, 1362 etc, which can cause null pointer access in the new interpreter. 1363 Fall back to the old one for now. 1364 1365 Fix the large glyph retry code and ensure hinting and scaling flags 1366 are set properly. 1367 1368 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a 1369 check for metrics_only. 1370 Set the `force_scaling' flag. 1371 (T1_Parse_Glyph): Updated. 1372 (T1_Load_Glyph): Add `hinting' and `scaled' flags. 1373 13742017-09-25 Ewald Hew <ewaldhew@gmail.com> 1375 1376 [psaux] Add missing objects (2/2). 1377 1378 Synthesize a `SubFont' object for Type 1 fonts. This is used in the 1379 interpreter to access Private dict data, which are stored in 1380 different places for Type 1 and CFF. This allows the same data to 1381 be used in either mode. 1382 1383 * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy 1384 required values to a dummy `CFF_SubFont' object. This is similar to 1385 `cff_make_private_dict'. 1386 * src/psaux/psobjs.h: Add the new declaration. 1387 1388 * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto. 1389 Add this to the PSAux Service for future use with CID fonts. 1390 1391 * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H. 1392 (T1_Parse_Glyph_And_Get_Char_String): Add the call. 1393 13942017-09-25 Ewald Hew <ewaldhew@gmail.com> 1395 1396 [psaux] Add missing objects for Type 1 (1/2). 1397 1398 Move `CF2_Font' instance to `PS_Decoder'. This is the context for 1399 the interpreter and since it is currently stored in `CFF_Font', is 1400 unavailable in Type 1 mode. 1401 1402 * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New 1403 `cf2_instance' field. 1404 1405 * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to 1406 `PS_Decoder'. 1407 1408 * src/psaux/t1decode.c (t1_decoder_done): Add finalization code. 1409 1410 * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses. 1411 14122017-09-25 Ewald Hew <ewaldhew@gmail.com> 1413 1414 Allow `type1' module to use the Adobe engine. 1415 1416 Add the callback and some conditionals to switch between the two 1417 engines. 1418 1419 * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change 1420 function declarations. 1421 * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the 1422 callbacks. 1423 1424 * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for 1425 number conversion. 1426 1427 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code 1428 to choose which renderer to use. 1429 1430 * src/cid/cidgload.c (cid_load_glyph): Update call. 1431 * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update 1432 includes. 1433 14342017-09-25 Ewald Hew <ewaldhew@gmail.com> 1435 1436 [type1] Add Adobe engine configuration. 1437 1438 Use the previously changed PS_Driver in type1 module to store 1439 hinting engine configuration. 1440 1441 * include/freetype/ftt1drv.h: New file. 1442 Duplicate and rename config options from CFF. 1443 * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro. 1444 1445 * src/type1/t1driver.c (t1_driver_class): Update declaration. 1446 * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H. 1447 (T1_Driver_Init): Update code. 1448 14492017-09-25 Ewald Hew <ewaldhew@gmail.com> 1450 1451 [cff] Move and rename `CFF_Driver'. 1452 1453 This is so that we can use the same hinting engine parameters for 1454 Type 1. 1455 1456 * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and 1457 move to... 1458 * include/freetype/internal/psaux.h (PS_Driver): ...here. 1459 1460 * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c, 1461 src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c, 1462 src/psaux/psobjs.c: Update references. 1463 14642017-09-25 Ewald Hew <ewaldhew@gmail.com> 1465 1466 [psaux, type1] Reorganize object fields. 1467 1468 Make some fields more generic, so that we can access them the same 1469 way regardless of Type 1 or CFF. 1470 1471 * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face' 1472 to `FT_Face'. 1473 Remove unused fields. 1474 1475 * src/psaux/psft.c: Update all accesses of `PS_Builder.face'. 1476 Add some asserts to guard against casting `T1_Face' as `TT_Face'. 1477 1478 * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow 1479 `CFF_GlyphSlot', so that we can pretend they are the same in the 1480 interpreter. 1481 1482 * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point): 1483 Updated with above changes. 1484 14852017-09-25 Ewald Hew <ewaldhew@gmail.com> 1486 1487 [psaux] Prepare for Type 1 mode. 1488 1489 Add some checks for Type 1 data passing through. 1490 1491 * src/psaux/psfont.h (CF2_Font): Add `isT1' flag. 1492 * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend 1493 code which is not applicable for Type 1. 1494 1495 * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing 1496 `decoder->cff' in Type 1 mode. 1497 Copy `is_t1' flag to `CF2_Font'. 1498 14992017-09-25 Ewald Hew <ewaldhew@gmail.com> 1500 1501 [psaux, cff] Use the new objects. 1502 1503 * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix 1504 switching between new and old engines. 1505 1506 * src/cff/cffgload.c, src/cff/cffparse.c: Update calls. 1507 1508 * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h, 1509 src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all 1510 to use new objects. 1511 15122017-09-24 Ewald Hew <ewaldhew@gmail.com> 1513 1514 [psaux] Objects for new interpreter (part 2). 1515 1516 Make the new objects copy over values. They are essentially wrapper 1517 types for the different decoders/builders. 1518 1519 * include/freetype/internal/psaux.h: Update declarations. 1520 (PS_Builder): Add `is_t1' flag. 1521 (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to... 1522 (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this. 1523 (PS_Decoder): Updated. 1524 Add `t1_parse_callback' member. 1525 (PSAux_ServiceRec): Add `ps_decoder_init' member. 1526 1527 * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations. 1528 1529 * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two 1530 modes. 1531 1532 * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux' 1533 service. 1534 15352017-09-24 Ewald Hew <ewaldhew@gmail.com> 1536 1537 [psaux] Add objects for new interpreter. 1538 1539 Introduce `PS_Decoder' and `PS_Builder' which include all fields 1540 from either Type 1 or CFF decoders/builders. 1541 1542 * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New 1543 structs. 1544 1545 * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder' 1546 functions. 1547 1548 * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold 1549 `PS_Decoder' initialization functions. 1550 1551 * src/psaux/psaux.c, src/psaux/Jamfile (_sources), 1552 src/psaux/rules.mk (PSAUX_DRV_SRC): Updated. 1553 15542017-09-24 Ewald Hew <ewaldhew@gmail.com> 1555 1556 [psaux] Rename files. 1557 1558 Replace the `cf2' file name prefix with `ps' as the Adobe engine 1559 will be used for both PostScript Types 1 and 2 (CFF) instead of just 1560 CFF. 1561 1562 s/cf2/ps/ for all following. 1563 1564 * src/psaux/cf2*: Rename files. 1565 * src/psaux/*: Update includes. 1566 1567 * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC, 1568 PSAUX_DRV_H): Update file references. 1569 15702017-09-24 Ewald Hew <ewaldhew@gmail.com> 1571 1572 [psaux] Minor fix. 1573 1574 Use `MultiMasters' service in `psaux' instead of a call to `cff'. 1575 The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined. 1576 1577 * src/psaux/cf2ft.c: Update includes. 1578 (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of 1579 `cff_get_var_blend'. 1580 15812017-09-24 Ewald Hew <ewaldhew@gmail.com> 1582 1583 [psaux, cff] Move `cff_random' into `psaux' service. 1584 1585 NOTE: Does not compile! 1586 1587 Minor fix to allow both `cff' and `psaux' to use `cff_random'. 1588 1589 * src/cff/cffload.c (cff_random): Move to... 1590 * src/psaux/psobjs.c: Here. 1591 * src/cff/cffload.h: Move corresponding declaration to 1592 `src/psaux/psobjs.h'. 1593 1594 * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the 1595 function here... 1596 * src/psaux/psauxmod.c: And here. 1597 1598 * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code. 1599 16002017-09-24 Ewald Hew <ewaldhew@gmail.com> 1601 1602 [cff] Move struct declarations to `freetype/internal'. 1603 1604 NOTE: Does not compile! 1605 1606 This is so that the CFF functions moved to `psaux' can access the 1607 same structs that they need. 1608 1609 * src/cff/cfftypes.h: Moved to... 1610 * include/freetype/internal/cfftypes.h: ...Here. 1611 1612 * src/cff/cffobjs.h: Moved the struct declarations to... 1613 * include/freetype/internal/cffotypes.h: ... this new file. 1614 1615 * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H, 1616 FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros. 1617 1618 * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c, 1619 src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c, 1620 src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h, 1621 include/freetype/internal/psaux.h, 1622 include/freetype/internal/services/svcfftl.h: Update includes. 1623 1624 * src/cff/rules.mk (CFF_DRV_H): Updated. 1625 16262017-09-24 Ewald Hew <ewaldhew@gmail.com> 1627 1628 [psaux, cff] Add new service for inter-module calls. 1629 1630 NOTE: Does not compile! 1631 1632 This is to allow CFF functions moved to `psaux' to call functions 1633 declared in `src/cff/cffload.h'. 1634 1635 * include/freetype/internal/services/svcfftl.h: New file, setting up 1636 a `CFFLoad' service. 1637 1638 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10, 1639 FT_DEFINE_SERVICEDESCREC): New macros. 1640 (FT_SERVICE_CFF_TABLE_LOAD_H): New macro. 1641 1642 * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service. 1643 1644 * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h 1645 (CF2_FontRec): Add service interface. 1646 1647 * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c, 1648 src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service. 1649 16502017-09-24 Ewald Hew <ewaldhew@gmail.com> 1651 1652 [psaux, cff] Add callbacks for inter-module calls. 1653 1654 NOTE: Does not compile! 1655 1656 * include/freetype/internal/psaux.h: Add function pointer 1657 declarations. 1658 1659 * src/psaux/cffdecode.c (cff_decoder_init): Update to take in 1660 callbacks. 1661 * src/psaux/cffdecode.h: Ditto. 1662 1663 * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load): 1664 Update calls to pass in callbacks. 1665 * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them. 1666 16672017-09-24 Ewald Hew <ewaldhew@gmail.com> 1668 1669 [psaux, cff] Create new `PSAux' service interface entries. 1670 1671 NOTE: Does not compile! 1672 1673 * include/freetype/internal/psaux.h: Include 1674 FT_INTERNAL_TRUETYPE_TYPES_H. 1675 (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables. 1676 (CFF_Builder): Updated. 1677 Fix for forward declaration. 1678 (PSAux_ServiceRec): New field `cff_decoder_funcs'. 1679 1680 * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New 1681 function tables. 1682 (PSAux_Interface): Updated. 1683 1684 * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux' 1685 service interface. 1686 1687 * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update 1688 function calls to use psaux service. 1689 16902017-09-24 Ewald Hew <ewaldhew@gmail.com> 1691 1692 [psaux, cff] Move CFF builder components into `psaux' module. 1693 1694 NOTE: Does not compile! 1695 1696 * src/cff/cffgload.c 1697 (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour}, 1698 cff_check_points): Move to... 1699 * src/psaux/psobjs.c: Here. 1700 1701 * src/cff/cffgload.h: Move corresponding declarations to 1702 `src/psaux/psobjs.h'. 1703 1704 * src/cff/cffgload.h (CFF_Builder): Move struct declaration to... 1705 * include/freetype/internal/psaux.h: Here. 1706 17072017-09-24 Ewald Hew <ewaldhew@gmail.com> 1708 1709 [psaux, cff] Move CFF decoder components into `psaux' module. 1710 1711 NOTE: Does not compile! 1712 1713 * src/cff/cffgload.c (CFF_Operator, 1714 CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts, 1715 cff_operator_seac, cff_compute_bias, 1716 cff_lookup_glyph_by_stdcharcode, 1717 cff_decoder_{parse_charstrings,init,prepare}): Move to... 1718 * src/psaux/cffdecode.c: This new file. 1719 1720 * src/cff/cffgload.h: Move corresponding declarations to... 1721 * src/psaux/cffdecode.h: This new file. 1722 1723 * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS}, 1724 CFF_Decoder_Zone, CFF_Decoder): Move declarations to... 1725 * include/freetype/internal/psaux.h: Here. 1726 1727 * src/psaux/cf2ft.h: Update include. 1728 1729 * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with 1730 the new file. 1731 17322017-09-24 Ewald Hew <ewaldhew@gmail.com> 1733 1734 [psaux, cff] Move Adobe's engine components into `psaux' module. 1735 1736 This is the first patch of a sequence to move the Type 2 charstring 1737 processing capability from the `cff' module to the `psaux' module. 1738 1739 NOTE: Does not compile! 1740 1741 * src/cff/cf2*: Move these files to... 1742 * src/psaux/cf2*: Here. 1743 1744 * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC, 1745 CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file 1746 references. 1747 1748 * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c 1749 (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references. 1750 17512017-09-24 Alexei Podtelezhnikov <apodtele@gmail.com> 1752 1753 Tweak per-face LCD filtering controls. 1754 1755 Thing are simpler with a NULL-function pointer. 1756 1757 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New 1758 pointer to the filter function. 1759 (FT_LibraryRec): Remove unused `lcd_filter'. 1760 (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here... 1761 * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc, 1762 ft_lcd_filter_fir): ... to here. 1763 1764 * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the 1765 per-face filter. 1766 (FT_Face_Properties): Set it. 1767 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify. 1768 1769 * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter): 1770 Minor. 1771 17722017-09-24 Jonathan Kew <jfkthame@gmail.com> 1773 1774 [sfnt] Fix `premultiply_data' (#52092). 1775 1776 * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension 1777 if we have less than 16 bytes of data. 1778 17792017-09-24 Werner Lemberg <wl@gnu.org> 1780 1781 [otvalid] Fix handling of ValueRecords. 1782 1783 For GPOS pair positioning format 1 the description of ValueRecords 1784 in the OpenType specification (1.8.2, from today) is wrong – the 1785 offset has to be taken from the parent structure; in this case the 1786 `PairSet' table. 1787 1788 * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'. 1789 (otv_PairPos_validate): Adjust. 1790 17912017-09-23 Werner Lemberg <wl@gnu.org> 1792 1793 [otvalid] Handle `GSUB' and `GPOS' v1.1 tables. 1794 1795 * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c 1796 (otv_GPOS_validate): Implement it. 1797 17982017-09-23 Werner Lemberg <wl@gnu.org> 1799 1800 [otvalid] Update common table handling to OpenType 1.8.2. 1801 1802 * src/otvalid/otvcommn.c (otv_Device_validate): Handle 1803 VariationIndex subtable. 1804 (otv_Lookup_validate): Handle MarkFilteringSet. 1805 18062017-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> 1807 1808 [build] Windows-style DLL versioning. 1809 1810 * build/windows/ftver.rc: New VERSIONINFO resource. 1811 * build/windows/vc2010/freetype.vcxproj: Further improvements. 1812 18132017-09-23 Ben Wagner <bungeman@google.com> 1814 1815 [truetype] Really fix #52082. 1816 1817 * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. 1818 18192017-09-23 Werner Lemberg <wl@gnu.org> 1820 1821 [otvalid] Handle `GDEF' v1.2 and v1.3 tables. 1822 1823 No validation of variation stuff yet. 1824 1825 * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function. 1826 (otv_GDEF_validate): Implement it. 1827 18282017-09-22 Werner Lemberg <wl@gnu.org> 1829 1830 [otvalid] Handle `BASE' v1.1 table. 1831 1832 No validation of variation stuff yet. 1833 1834 * src/otvalid/otvbase.c (otv_BASE_validate): Implement it. 1835 18362017-09-22 Werner Lemberg <wl@gnu.org> 1837 1838 [otvalid] Macros for 32bit offset support. 1839 1840 * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32, 1841 OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros. 1842 18432017-09-21 Alexei Podtelezhnikov <apodtele@gmail.com> 1844 1845 [build] Simplify Visual C++ 2010 project. 1846 1847 * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded 1848 configurations and tweak. 1849 18502017-09-21 Werner Lemberg <wl@gnu.org> 1851 1852 [truetype] Integer overflow (#52082). 1853 1854 * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS. 1855 18562017-09-21 Werner Lemberg <wl@gnu.org> 1857 1858 [sfnt] Fix postscript name for default instance of variation fonts. 1859 1860 Problem reported by Behdad. 1861 1862 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test 1863 `is_default_instance'. 1864 18652017-09-21 Werner Lemberg <wl@gnu.org> 1866 1867 [truetype] Fix `mmvar' array pointers, part 2. 1868 1869 The previous commit was incomplete. 1870 1871 * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for 1872 `master' also. 1873 18742017-09-21 Werner Lemberg <wl@gnu.org> 1875 1876 [truetype] Fix `mmvar' array pointers. 1877 1878 Without this change, clang's AddressSanitizer reports many runtime 1879 errors due to misaligned addresses. 1880 1881 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer 1882 size for sub-array offsets into `mmvar'. 1883 18842017-09-20 Werner Lemberg <wl@gnu.org> 1885 1886 [truetype] Integer overflows. 1887 1888 Changes triggered by 1889 1890 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429 1891 1892 * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG. 1893 (Ins_MIAP): Use SUB_LONG. 1894 18952017-09-19 Alexei Podtelezhnikov <apodtele@gmail.com> 1896 1897 [build] Fix DLL builds in Visual C++ project. 1898 1899 * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug 1900 and Release configurations. 1901 * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) 1902 [_DLL]: Use Visual C++ extensions. 1903 19042017-09-19 John Tytgat <John.Tytgat@esko.com> 1905 1906 [cff] Fix family name logic of pure CFF fontdata (#52056). 1907 1908 1. If `FamilyName' is present in the CFF font, use this for 1909 FT_Face's `family_name'. 1910 2. Otherwise, use the face name and chop off any subset prefix. 1911 3. If at this point FT_Face's `family_name' is set, use this 1912 together with the full name to determine the style. 1913 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'. 1914 5. If we don't have a valid style, use "Regular". 1915 1916 Previously, FT_Face's `family_name' entry for pure CFF fontdata 1917 nearly always was the fontname itself, instead of the `FamilyName' 1918 entry in the CFF font (assuming there is one). 1919 1920 * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it. 1921 19222017-09-18 Alexei Podtelezhnikov <apodtele@gmail.com> 1923 1924 [build] Declutter Visual C++ 2010-2017 project. 1925 1926 * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02) 1927 optimization for Release configuration throughout the project. 1928 19292017-09-16 Werner Lemberg <wl@gnu.org> 1930 1931 * Version 2.8.1 released. 1932 ========================= 1933 1934 1935 Tag sources with `VER-2-8-1'. 1936 1937 * docs/VERSION.TXT: Add entry for version 2.8.1. 1938 * docs/CHANGES: Updated. 1939 1940 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, 1941 builds/windows/vc2005/index.html, 1942 builds/windows/vc2008/freetype.vcproj, 1943 builds/windows/vc2008/index.html, 1944 builds/windows/vc2010/freetype.vcxproj, 1945 builds/windows/vc2010/index.html, 1946 builds/windows/visualc/freetype.dsp, 1947 builds/windows/visualc/freetype.vcproj, 1948 builds/windows/visualc/index.html, 1949 builds/windows/visualce/freetype.dsp, 1950 builds/windows/visualce/freetype.vcproj, 1951 builds/windows/visualce/index.html, 1952 builds/wince/vc2005-ce/freetype.vcproj, 1953 builds/wince/vc2005-ce/index.html, 1954 builds/wince/vc2008-ce/freetype.vcproj, 1955 builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/. 1956 1957 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. 1958 1959 * builds/unix/configure.raw (version_info): Set to 21:0:15. 1960 * CMakeLists.txt (VERSION_PATCH): Set to 1. 1961 19622017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1963 1964 [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7. 1965 1966 __builtin_shuffle() was introduced in gcc-4.7. The lowest 1967 gcc to enable vector operation is delayed from 4.6 to 4.7. 1968 1969 * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to 1970 enable the vector operation, to change the lowest gcc version 1971 from 4.6 to 4.7. 1972 19732017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1974 1975 [cache] Fix a possible overflow by signed integer comparison. 1976 1977 Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 , 1978 issues are found by Behdad Esfahbod and Werner Lemberg. 1979 1980 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace 1981 a subtraction to check higher bit by a bit operation, 1982 and cpp-conditionalize for appropriate systems. Add better 1983 documentation to the comment. 1984 (FTC_ImageCache_LookupScaler): Ditto. 1985 (FTC_SBitCache_Lookup): Ditto. 1986 (FTC_SBitCache_LookupScaler): Ditto. 1987 19882017-09-13 Werner Lemberg <wl@gnu.org> 1989 1990 [autofit] Really fix #41334 (#52000). 1991 1992 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set 1993 `segment->delta' everywhere. 1994 19952017-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1996 1997 [autofit, sfnt] Fix for `make multi'. 1998 1999 * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use 2000 FT_Get_Advance() in it. 2001 * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H 2002 to use PS_Unicodes in it, also include `ttpost.h' to use 2003 tt_face_get_ps_name() in it. 2004 20052017-09-11 Azzuro <azzuro@team-mediaportal.com> 2006 2007 [build] Improve builds with different MS Visual Studio versions. 2008 2009 * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset 2010 according to the Visual Studio version. 2011 20122017-09-11 Werner Lemberg <wl@gnu.org> 2013 2014 * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables. 2015 2016 Reported by Behdad. 2017 20182017-09-09 Werner Lemberg <wl@gnu.org> 2019 2020 [autofit] Improve communication with ftgrid. 2021 2022 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): 2023 Provide values in font units. 2024 20252017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2026 2027 [base] Remove a check for resource ID in the resource fork driver. 2028 2029 LastResort.dfont has a marginal resource ID 0xFFFF for sfnt 2030 resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs' 2031 (1-46), tells that some IDs are reserved and should not be used. 2032 FreeType2 just uses resource ID to sort the fragmented resource. 2033 To accept the marginal fonts, the checking is removed. 2034 2035 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id 2036 validity check, fix a trace message format. 2037 20382017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2039 2040 [sfnt, truetype] Register the tags for marginal fonts. 2041 2042 The first 32bit of standard TrueType variants is 0x00010000, 2043 `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac 2044 OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources 2045 starting 0xA5 followed by `kbd' or `lst'. Considering the following 2046 data could be parsed as conventional TrueType fonts, the header 2047 checking is updated to allow these tags. It seems that recent Mac 2048 OS X has already switched to normal TTF for these fonts. 2049 2050 See the discussion at 2051 http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0 2052 2053 * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header 2054 tags for Keyboard.dfont and LastResort.dfont. 2055 * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource 2056 starts with TTAG_0xA5kbd or TTAG_0xA5lst. 2057 * src/truetype/ttobjs.c (tt_face_init): Accept the face with the 2058 format tag is TTAG_0xA5kbd or TTAG_0xA5lst. 2059 20602017-09-05 Werner Lemberg <wl@gnu.org> 2061 2062 Fix multiple calls of `FT_Bitmap_Convert'. 2063 2064 The documentation of `FT_Bitmap_Convert' says that multiple calls do 2065 proper reallocation of the target FT_Bitmap object. However, this 2066 failed for the sequence 2067 2068 non-empty bitmap 2069 empty bitmap 2070 non-empty bitmap 2071 2072 Reason was that `FT_Bitmap_Convert' only reallocated the bitmap 2073 buffer if it became too small; it didn't make the buffer smaller. 2074 For an empty bitmap following a non-empty one, only the buffer 2075 dimension got set to zero, without deallocation. If the next call 2076 was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was 2077 triggered. 2078 2079 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target 2080 buffer to the correct size. 2081 2082 * docs/CHANGES: Document it. 2083 20842017-09-05 Werner Lemberg <wl@gnu.org> 2085 2086 [bdf] Fix size and resolution handling. 2087 2088 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if 2089 `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are 2090 missing. 2091 2092 * docs/CHANGES: Document it. 2093 20942017-08-25 Alexei Podtelezhnikov <apodtele@gmail.com> 2095 2096 Swap `ALLOC_MULT' arguments (#51833). 2097 2098 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated. 2099 * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated. 2100 * src/raster/ftrend1.c (ft_raster1_render): Updated. 2101 21022017-08-23 Werner Lemberg <wl@gnu.org> 2103 2104 [sfnt] Fix clang compilation (#51788). 2105 2106 * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of 2107 scalars. 2108 (vector_shuffle): New macro to take care of a different built-in 2109 function name on clang. 2110 21112017-08-22 Werner Lemberg <wl@gnu.org> 2112 2113 [base] Don't zero out allocated memory twice (#51816). 2114 2115 Patch applied from bug report. 2116 2117 * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to 2118 avoid unnecessary overhead. 2119 21202017-08-22 Werner Lemberg <wl@gnu.org> 2121 2122 [truetype] Integer overflow. 2123 2124 Changes triggered by 2125 2126 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107 2127 2128 * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use 2129 NEG_LONG. 2130 21312017-08-17 Alexei Podtelezhnikov <apodtele@gmail.com> 2132 2133 [sfnt] Avoid synthetic unicode for symbol fonts with PUA. 2134 2135 Reported as 2136 2137 https://bugs.chromium.org/p/chromium/issues/detail?id=754574 2138 2139 * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL. 2140 21412017-08-16 Werner Lemberg <wl@gnu.org> 2142 2143 * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings. 2144 21452017-08-15 Behdad Esfahbod <behdad@behdad.org> 2146 2147 [sfnt] Speed up PNG image loading. 2148 2149 This reduces the overhead of `premultiply_data' by 60%. 2150 2151 * src/sfnt/pngshim.c (premultiply_data): Provide code which uses 2152 gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a 2153 time. 2154 21552017-08-11 Werner Lemberg <wl@gnu.org> 2156 2157 [sfnt, truetype] Improve handling of missing sbits. 2158 2159 Requested by Behdad. 2160 2161 Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain 2162 entries in the bitmap strike(s) for empty glyphs. Instead, they 2163 rely that a space glyph gets created from the font's metrics data. 2164 This commit makes FreeType behave accordingly. 2165 2166 * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error 2167 code. 2168 2169 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes 2170 to make a distinction between a missing bitmap in a composite and a 2171 simple missing bitmap. 2172 2173 * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a 2174 bitmap-only font), synthesize an empty bitmap glyph if metrics are 2175 available. 2176 21772017-08-10 Werner Lemberg <wl@gnu.org> 2178 2179 [base] Minor API improvement for default variation axis setting. 2180 2181 * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, 2182 FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, 2183 FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0. 2184 2185 * docs/CHANGES: Updated. 2186 21872017-08-08 Werner Lemberg <wl@gnu.org> 2188 2189 [psnames] Really fix issue #49949. 2190 2191 We now use a separate preprocessor macro to handle both definition 2192 and declaration of the glyph name arrays. 2193 2194 * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro. 2195 2196 * src/tools/glnames.py (StringTable::dump, 2197 StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'. 2198 (dump_encoding): Ditto. 2199 (main): Use `wb' mode for writing the output file, which works on 2200 Windows also. 2201 2202 * src/psnames/pstables.h: Regenerated. 2203 22042017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2205 2206 [smooth] Harmony LCD rendering. 2207 2208 This is a new technology for LCD-optimized rendering. It capitalizes 2209 on the fact that each color channel grid is shifted by a third of a 2210 pixel. Therefore it is logical to render 3 separate monochrome 2211 bitmaps shifting the outline by 1/3 pixel, and then combine them. 2212 Importantly, the resulting output does not require additional LCD 2213 filtering. 2214 2215 * src/smooth/ftsmooth.c (ft_smooth_render_generic) 2216 [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized 2217 rendering. 2218 2219 * include/freetype/ftlcdfil.h, include/freetype/freetype.h, 2220 include/freetype/config/ftoption.h, devel/ftoption.h: Updated 2221 documentation. 2222 22232017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2224 2225 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up. 2226 22272017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> 2228 2229 * src/sfnt/ttpost.c (format): Use otspec-compliant versions. 2230 22312017-08-05 Werner Lemberg <wl@gnu.org> 2232 2233 [truetype] Integer overflow. 2234 2235 Reported as 2236 2237 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868 2238 2239 * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG. 2240 22412017-08-05 Werner Lemberg <wl@gnu.org> 2242 2243 [base, truetype] New function `FT_Get_Var_Axis_Flags'. 2244 2245 The reserved `flags' field got a value in OpenType version 1.8.2; 2246 unfortunately, the public `FT_Var_Axis' structure misses the 2247 corresponding element. Since we can't add a new field, we add an 2248 access function. 2249 2250 * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function. 2251 2252 * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro. 2253 Updated. 2254 2255 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory 2256 of `mmvar' to hold axis flags. 2257 Fill the axis flags array. 2258 2259 * docs/CHANGES: Updated. 2260 22612017-08-03 Nikolaus Waxweiler <madigens@gmail.com> 2262 2263 [truetype] Fix metrics of B/W hinting in v40 mode. 2264 2265 Phantom points are now saved outside v40 backwards compatibility 2266 mode. This fixes the jumping glyphs when switching between v35 and 2267 v40 monochrome mode. 2268 2269 * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic. 2270 22712017-08-03 Nikolaus Waxweiler <madigens@gmail.com> 2272 2273 [truetype] Do not set any ClearType flags in v40 monochrome mode. 2274 2275 This fixes weird behavior of instructions that resulted in rendering 2276 differences between v35 and v40 in monochrome mode, e.g., in 2277 `timesbi.ttf'. 2278 2279 * src/truetype/ttinterp.c (Ins_GETINFO) 2280 [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check 2281 `subpixel_hinting_lean'. 2282 22832017-08-01 Werner Lemberg <wl@gnu.org> 2284 2285 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko. 2286 22872017-08-01 Behdad Esfahbod <behdad@behdad.org> 2288 2289 [truetype] Fix loading of named instances. 2290 2291 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position 2292 while loading the `avar' table. 2293 22942017-08-01 Werner Lemberg <wl@gnu.org> 2295 2296 [sfnt, truetype] Minor adjustments for OpenType 1.8.2. 2297 2298 * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now 2299 (tighter) limits. 2300 2301 * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType 2302 version explicitly allows all negative values for the number of 2303 contours if we have a composite glyph (this is for better backwards 2304 compatibility I guess), but it still recommends value -1. 2305 23062017-07-26 Werner Lemberg <wl@gnu.org> 2307 2308 [cff] Integer overflow. 2309 2310 Reported as 2311 2312 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738 2313 2314 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset, 2315 cf2_glyphpath_curveTo): Use ADD_INT32. 2316 23172017-07-13 Werner Lemberg <wl@gnu.org> 2318 2319 [base] Fix memory leak. 2320 2321 Reported as 2322 2323 https://bugs.chromium.org/p/chromium/issues/detail?id=738362 2324 2325 * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case 2326 of error. 2327 23282017-07-12 Werner Lemberg <wl@gnu.org> 2329 2330 [base] Integer overflow. 2331 2332 Reported as 2333 2334 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573 2335 2336 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use 2337 FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG. 2338 23392017-07-12 Werner Lemberg <wl@gnu.org> 2340 2341 * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo. 2342 2343 Also improve tracing message. 2344 2345 Problem reported as 2346 2347 https://bugs.chromium.org/p/chromium/issues/detail?id=738919 2348 23492017-07-07 Werner Lemberg <wl@gnu.org> 2350 2351 [cff] Integer overflow. 2352 2353 Reported as 2354 2355 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517 2356 2357 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32. 2358 23592017-07-05 Werner Lemberg <wl@gnu.org> 2360 2361 * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning. 2362 23632017-07-05 Werner Lemberg <wl@gnu.org> 2364 2365 * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395). 2366 23672017-07-04 Werner Lemberg <wl@gnu.org> 2368 2369 [truetype] Prevent address overflow (#51365). 2370 2371 * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard. 2372 23732017-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> 2374 2375 * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code. 2376 23772017-07-03 Werner Lemberg <wl@gnu.org> 2378 2379 [truetype] Integer overflow. 2380 2381 Reported as 2382 2383 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455 2384 2385 * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG. 2386 23872017-07-01 Alexei Podtelezhnikov <apodtele@gmail.com> 2388 2389 * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name. 2390 23912017-06-28 Ben Wagner <bungeman@google.com> 2392 2393 Avoid Microsoft compiler warnings (#51331). 2394 2395 While clang's sanitizer recommends a cast to unsigned for safe 2396 negation (to handle -INT_MIN), both MSVC and Visualc emit warning 2397 C4146 if an unsigned value gets negated. 2398 2399 * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32), 2400 src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a 2401 subtraction. 2402 24032017-06-27 Werner Lemberg <wl@gnu.org> 2404 2405 * src/cff/cffparse.c (do_fixed): Fix typo. 2406 2407 Spotted by chris <chris@gcjd.org>. 2408 24092017-06-27 Werner Lemberg <wl@gnu.org> 2410 2411 [truetype] Integer overflows. 2412 2413 Reported as 2414 2415 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384 2416 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391 2417 2418 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use 2419 NEG_LONG. 2420 2421 * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG. 2422 24232017-06-24 Werner Lemberg <wl@gnu.org> 2424 2425 [truetype] Integer overflows. 2426 2427 Reported as 2428 2429 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364 2430 2431 * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG. 2432 24332017-06-22 Werner Lemberg <wl@gnu.org> 2434 2435 [cff, truetype] Integer overflows. 2436 2437 Reported as 2438 2439 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323 2440 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328 2441 2442 * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and 2443 SUB_INT32. 2444 2445 * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG. 2446 24472017-06-21 Alexei Podtelezhnikov <apodtele@gmail.com> 2448 2449 [sfnt] Synthesize a Unicode charmap if one is missing. 2450 2451 * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it. 2452 * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init, 2453 tt_cmap_unicode_done, tt_cmap_unicode_char_index, 2454 tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement 2455 synthetic Unicode charmap class. 2456 (tt_get_cmap_info): Make sure the callback is available. 2457 2458 * src/sfnt/sfobjs.c (sfnt_load_face) 2459 [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing, 2460 synthesize one. 2461 2462 * include/freetype/config/ftoption.h: Document it. 2463 * devel/ftoption.h: Ditto. 2464 24652017-06-20 Tony Theodore <tonyt@logyst.com> 2466 2467 Fix pkg-config in freetype-config for cross-compiling (#51274). 2468 2469 * builds/unix/unix-def.in (PKG_CONFIG): New variable. 2470 (freetype-config): Use it in sed expression. 2471 2472 * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/. 2473 24742017-06-20 Werner Lemberg <wl@gnu.org> 2475 2476 [cff, truetype] Integer overflows. 2477 2478 Reported as 2479 2480 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300 2481 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313 2482 2483 * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32. 2484 2485 * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS. 2486 24872017-06-17 Alexei Podtelezhnikov <apodtele@gmail.com> 2488 2489 [base, smooth] LCD filtering cleanups. 2490 2491 * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): 2492 Clean up, start filtering from the bottom-left origin. 2493 2494 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated. 2495 24962017-06-16 Werner Lemberg <wl@gnu.org> 2497 2498 [truetype] Integer overflows. 2499 2500 Reported as 2501 2502 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270 2503 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276 2504 2505 * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use 2506 ADD_LONG and SUB_LONG. 2507 25082017-06-15 Werner Lemberg <wl@gnu.org> 2509 2510 [bdf, cff] Integer overflows. 2511 2512 Reported as 2513 2514 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244 2515 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261 2516 2517 * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with 2518 direct code to avoid value negation. 2519 2520 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and 2521 ADD_INT32. 2522 25232017-06-13 Werner Lemberg <wl@gnu.org> 2524 2525 * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding. 2526 2527 FreeType only sets a default active encoding for Unicode. 2528 25292017-06-13 Werner Lemberg <wl@gnu.org> 2530 2531 [cff, truetype] Integer overflows. 2532 2533 Reported as 2534 2535 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216 2536 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218 2537 2538 * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32. 2539 2540 * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG. 2541 25422017-06-11 Werner Lemberg <wl@gnu.org> 2543 2544 [cff] Integer overflows. 2545 2546 Reported as 2547 2548 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200 2549 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210 2550 2551 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and 2552 ADD_INT32. 2553 2554 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO>: Use 2555 ADD_INT32. 2556 25572017-06-10 Werner Lemberg <wl@gnu.org> 2558 2559 [truetype] Fix TT_Set_Var_Design. 2560 2561 Reported by Nikolaus Waxweiler <madigens@gmail.com>. 2562 2563 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the 2564 case where we have less input coordinates than axes. 2565 25662017-06-10 Werner Lemberg <wl@gnu.org> 2567 2568 * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo. 2569 2570 Bug introduced 2017-05-28. 2571 25722017-06-09 Werner Lemberg <wl@gnu.org> 2573 2574 [cff, truetype] Integer overflows. 2575 2576 Reported as 2577 2578 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144 2579 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151 2580 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153 2581 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173 2582 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186 2583 2584 * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32. 2585 2586 * src/truetype/ttinterp.c (Round_None, Round_To_Grid, 2587 Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, 2588 Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG, 2589 SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG, 2590 FT_PAD_ROUND_LONG 2591 (Ins_SxVTL, Ins_MIRP): Use SUB_LONG. 2592 (_iup_worker_shift): Use SUB_LONG and ADD_LONG. 2593 25942017-06-09 Werner Lemberg <wl@gnu.org> 2595 2596 Provide more macros for flooring, ceiling, and rounding. 2597 2598 These versions don't produce run-time errors due to integer 2599 overflow. 2600 2601 * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H. 2602 (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG, 2603 FT_PIX_CEIL_LONG): New macros. 2604 (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32, 2605 FT_PIX_CEIL_INT32): New macros. 2606 26072017-06-09 Werner Lemberg <wl@gnu.org> 2608 2609 Remove unused macros. 2610 2611 * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT, 2612 NEG_INT): Deleted. 2613 26142017-06-09 Werner Lemberg <wl@gnu.org> 2615 2616 */*: Remove `OVERFLOW_' prefix. 2617 2618 This increases readability. 2619 26202017-06-07 Werner Lemberg <wl@gnu.org> 2621 2622 [cff, truetype] Integer overflows. 2623 2624 Reported as 2625 2626 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133 2627 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137 2628 2629 * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32. 2630 2631 * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use 2632 OVERFLOW_SUB_LONG. 2633 26342017-06-06 Werner Lemberg <wl@gnu.org> 2635 2636 [cff] Integer overflows. 2637 2638 Reported as 2639 2640 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109 2641 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110 2642 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122 2643 2644 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. 2645 2646 * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else 2647 branches. 2648 26492017-06-05 Werner Lemberg <wl@gnu.org> 2650 2651 [cff] Integer overflow. 2652 2653 Reported as 2654 2655 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089 2656 2657 * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32. 2658 26592017-06-04 Werner Lemberg <wl@gnu.org> 2660 2661 [cff, truetype] Integer overflows. 2662 2663 Reported as 2664 2665 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075 2666 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088 2667 2668 * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32. 2669 2670 * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG, 2671 OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG. 2672 26732017-06-03 Werner Lemberg <wl@gnu.org> 2674 2675 [base, cff, truetype] Integer overflows. 2676 2677 Reported as 2678 2679 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060 2680 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062 2681 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063 2682 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068 2683 2684 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use 2685 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. 2686 2687 * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c 2688 (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32. 2689 2690 * src/truetype/ttgload.c (compute_glyph_metrics): User 2691 OVERFLOW_SUB_LONG. 2692 2693 * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig, 2694 Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X, 2695 Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use 2696 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. 2697 26982017-06-03 Werner Lemberg <wl@gnu.org> 2699 2700 * builds/unix/freetype-config.in: Fix pkg-config test (#51162). 2701 2702 Patch directly taken from bug report. 2703 27042017-06-03 Werner Lemberg <wl@gnu.org> 2705 2706 [bdf] Synchronize sanity checks with pcf driver. 2707 2708 Reported as 2709 2710 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054 2711 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058 2712 2713 * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent. 2714 Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and 2715 RESOLUTION_Y properties. 2716 27172017-06-03 Werner Lemberg <wl@gnu.org> 2718 2719 [cff, truetype] Integer overflows. 2720 2721 Reported as 2722 2723 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047 2724 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057 2725 2726 * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32. 2727 2728 * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG. 2729 (Ins_SUB): Use OVERFLOW_SUB_LONG. 2730 (Ins_NEG): Use NEG_LONG. 2731 27322017-06-03 Werner Lemberg <wl@gnu.org> 2733 2734 ftcalc.h: Avoid left-shift of negative numbers. 2735 2736 Reported as 2737 2738 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055 2739 2740 * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6, 2741 INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication. 2742 27432017-06-02 Werner Lemberg <wl@gnu.org> 2744 2745 [cff] Even more integer overflows. 2746 2747 Reported as 2748 2749 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046 2750 2751 * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use 2752 OVERFLOW_ADD_INT32. 2753 27542017-06-02 Werner Lemberg <wl@gnu.org> 2755 2756 [cff] More integer overflows. 2757 2758 Reported as 2759 2760 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032 2761 2762 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. 2763 27642017-06-02 Werner Lemberg <wl@gnu.org> 2765 2766 [bdf] Don't left-shift negative numbers. 2767 2768 Reported as 2769 2770 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031 2771 2772 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication. 2773 27742017-06-02 Werner Lemberg <wl@gnu.org> 2775 2776 [bdf] Fix integer scanning routines. 2777 2778 Reported as 2779 2780 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029 2781 2782 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos): 2783 Stop scanning if result would overflow. 2784 27852017-06-02 Werner Lemberg <wl@gnu.org> 2786 2787 [cff] Fix integer overflows. 2788 2789 Reported as 2790 2791 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027 2792 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028 2793 2794 * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c 2795 (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32. 2796 27972017-06-01 Werner Lemberg <wl@gnu.org> 2798 2799 [smooth] Some 32bit integer overflow run-time errors. 2800 2801 * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG, 2802 OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros. 2803 [!STANDALONE]: Include FT_INTERNAL_CALC_H. 2804 (gray_render_cubic): Use those macros where appropriate. 2805 28062017-06-01 Werner Lemberg <wl@gnu.org> 2807 2808 * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'. 2809 28102017-06-01 Werner Lemberg <wl@gnu.org> 2811 2812 [psaux] 32bit integer overflow tun-time errors (#46149). 2813 2814 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use 2815 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate. 2816 28172017-06-01 Werner Lemberg <wl@gnu.org> 2818 2819 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again. 2820 2821 Problem reported by Marek Kašík <mkasik@redhat.com>. 2822 2823 The problematic font that exceeds the old limit is Padauk-Bold, 2824 version 3.002, containing bytecode generated by a buggy version of 2825 ttfautohint. 2826 28272017-05-31 Werner Lemberg <wl@gnu.org> 2828 2829 [cff] 32bit integer overflow run-time errors 2/2 (#46149). 2830 2831 This commit handles the new engine. 2832 2833 * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32, 2834 OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG, 2835 NEG_INT32): New macros. 2836 2837 * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32. 2838 2839 * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init, 2840 cf2_hintmap_map, cf2_glyphpath_hintPoint, 2841 cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset, 2842 cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use 2843 OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and 2844 NEG_INT32 where appropriate. 2845 2846 * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend, 2847 cf2_interpT2CharString): Ditto. 2848 Also add some other code where needed to avoid overflow. 2849 28502017-05-30 Werner Lemberg <wl@gnu.org> 2851 2852 [cff] 32bit integer overflow run-time errors 1/2 (#46149). 2853 2854 This commit handles the old engine. 2855 2856 * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H. 2857 (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and 2858 OVERFLOW_SUB_LONG where needed. 2859 2860 * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H. 2861 (power_ten_limits): New static array. 2862 (do_fixed): Use it to prevent multiplication overflow. 2863 (cff_parser_run): Use OVERFLOW_ADD_LONG. 2864 28652017-05-30 Werner Lemberg <wl@gnu.org> 2866 2867 [psaux] Correctly handle sequences of multiple number signs. 2868 2869 * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero 2870 if we encounter more than a single sign. 2871 28722017-05-29 Werner Lemberg <wl@gnu.org> 2873 2874 [pcf] 32bit integer overflow run-time errors (#46149). 2875 2876 * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for 2877 `fontAscent' and `fontDescent'. 2878 (pcf_load_font): Add sanity checks for global height. 2879 Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, 2880 RESOLUTION_X, and RESOLUTION_Y properties. 2881 28822017-05-29 Werner Lemberg <wl@gnu.org> 2883 2884 Handle some integer overflow run-time errors (#46149, #48979). 2885 2886 This commit (mainly for 32bit CPUs) is the first of a series of 2887 similar commits to handle known integer overflows. Basically, all 2888 of them are harmless, since they affect rendering of glyphs only, 2889 not posing security threats. It is expected that fuzzying will show 2890 up more overflows, to be fixed in due course. 2891 2892 The idea is to mark places where overflows can occur, using macros 2893 that simply cast to unsigned integers, because overflow arithmetic 2894 is well defined in this case. Doing so suppresses run-time errors 2895 of sanitizers without adding computational overhead. 2896 2897 * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT, 2898 OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG, 2899 OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros. 2900 2901 * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply, 2902 FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled, 2903 ft_corner_orientation): Use new macros. 2904 2905 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros. 2906 29072017-05-28 Werner Lemberg <wl@gnu.org> 2908 2909 * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove. 2910 2911 This macro is not used. 2912 29132017-05-28 Werner Lemberg <wl@gnu.org> 2914 2915 [cff] s/cf2_floatToFixed/cf2_doubleToFixed/. 2916 2917 The new name better describes what the macro actually does; 2918 additionally, we don't need a trailing `f' for literals (there was 2919 only a single such instance in the code, but this caused a clang 2920 warning because the macro itself uses `double' literals). 2921 2922 * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h, 2923 src/cff/cf2font.c, src/cff/cf2hints.c: Updated. 2924 29252017-05-28 Werner Lemberg <wl@gnu.org> 2926 2927 Fix negation of INT_MIN and LONG_MIN (#46149). 2928 2929 * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned 2930 value, to be used as the result. 2931 (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix, 2932 FT_Vector_NormLen): Updated. 2933 29342017-05-27 Werner Lemberg <wl@gnu.org> 2935 2936 [truetype] Fix handling of design coordinates (#51127). 2937 2938 * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design 2939 coordinates if we have to create the `blends->coord' array. 2940 (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance 2941 coordinates if no instance is selected yet. 2942 29432017-05-24 Werner Lemberg <wl@gnu.org> 2944 2945 [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). 2946 2947 Problem reported by Marek Kašík <mkasik@redhat.com>, cf. 2948 2949 https://bugzilla.redhat.com/show_bug.cgi?id=1451795 2950 2951 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c 2952 (PCF_Face_Init): Implement it. 2953 29542017-05-20 Nikolaus Waxweiler <madigens@gmail.com> 2955 2956 [truetype] Always use interpreter v35 for B/W rendering (#51051). 2957 2958 * src/truetype/ttgload.c (tt_loader_init) 2959 [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust 2960 `subpixel_hinting_lean', `grayscale_cleartype', and 2961 `vertical_lcd_lean' accordingly. 2962 2963 * src/truetype/ttinterp.c (Ins_GETINFO): Updated. 2964 (TT_RunIns): Update `backward_compatibility' flag. 2965 29662017-05-20 Alexei Podtelezhnikov <apodtele@gmail.com> 2967 2968 [smooth] Implement minimal dynamic padding for LCD filtering. 2969 2970 Extra bitmap padding for LCD filtering depends on the filter. The 2971 default 5-tap filter needs 2 extra subpixels. The light 3-tap filter 2972 needs only 1 extra subpixel. This space could be already available 2973 due to rounding. In order to optimize the padding, we now expand 2974 CBox for the given filter weights before rounding. 2975 2976 This change breaks current Skia (and Firefox). 2977 2978 * include/freetype/internal/ftobjs.h (FT_LibraryRec) 2979 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field. 2980 2981 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights, 2982 FT_Library_SetLcdFilter): Remove `lcd_extra' initializations. 2983 2984 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic 2985 LCD padding. 2986 29872017-05-15 Werner Lemberg <wl@gnu.org> 2988 2989 [sfnt] Return proper scaling values for SBIX bitmaps. 2990 2991 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. 2992 2993 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it. 2994 29952017-05-15 Werner Lemberg <wl@gnu.org> 2996 2997 [truetype] Fix error handling for embedded bitmaps. 2998 2999 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. 3000 3001 * src/truetype/ttgload.c (TT_Load_Glyph) 3002 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not 3003 scalable. 3004 30052017-05-15 Alexei Podtelezhnikov <apodtele@gmail.com> 3006 3007 [autofit] Make autohint warping NORMAL option. 3008 3009 This moves warping option from LIGHT to NORMAL mode. This makes LIGHT 3010 truly void of hinting in x-direction, with left side bearing never 3011 changed and right side bearing only altered by advance rounding. 3012 Therefore, LIGHT is now ready to return fractional advance. As a 3013 NORMAL option, warping substitutes normal hinting. 3014 3015 * src/autofit/afcjk.c (af_cjk_hints_apply): Updated. 3016 * src/autofit/aflatin.c (af_latin_hints_apply): Updated. 3017 * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated. 3018 3019 * src/autofit/afloader.c (af_loader_load_glyph): Handle warping 3020 phantom points as normal. 3021 30222017-05-14 Werner Lemberg <wl@gnu.org> 3023 3024 Remove remnants of raster pool. 3025 3026 * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove 3027 `raster_pool' and `raster_pool_size' fields. 3028 3029 * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c 3030 (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated. 3031 30322017-05-13 Werner Lemberg <wl@gnu.org> 3033 3034 * Version 2.8 released. 3035 ======================= 3036 3037 3038 Tag sources with `VER-2-8'. 3039 3040 * docs/VERSION.TXT: Add entry for version 2.8. 3041 * docs/CHANGES: Updated. 3042 3043 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, 3044 builds/windows/vc2005/index.html, 3045 builds/windows/vc2008/freetype.vcproj, 3046 builds/windows/vc2008/index.html, 3047 builds/windows/vc2010/freetype.vcxproj, 3048 builds/windows/vc2010/index.html, 3049 builds/windows/visualc/freetype.dsp, 3050 builds/windows/visualc/freetype.vcproj, 3051 builds/windows/visualc/index.html, 3052 builds/windows/visualce/freetype.dsp, 3053 builds/windows/visualce/freetype.vcproj, 3054 builds/windows/visualce/index.html, 3055 builds/wince/vc2005-ce/freetype.vcproj, 3056 builds/wince/vc2005-ce/index.html, 3057 builds/wince/vc2008-ce/freetype.vcproj, 3058 builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/. 3059 3060 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. 3061 (FREETYPE_PATCH): Set to 0. 3062 3063 * builds/unix/configure.raw (version_info): Set to 20:0:14. 3064 * CMakeLists.txt (VERSION_MINOR): Set to 8. 3065 (VERSION_PATCH): Set to 0. 3066 30672017-05-12 Hin-Tak Leung <htl10@users.sourceforge.net> 3068 3069 Fix `FT_UINT_TO_POINTER' macro for Windows. 3070 3071 * builds/unix/ftconfig.in, builds/vms/ftconfig.h, 3072 include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: 3073 Fix definition. 3074 30752017-05-11 Sascha Brawer <sascha@google.com> 3076 Werner Lemberg <wl@gnu.org 3077 3078 [autofit] Add support for Chakma script. 3079 3080 * src/autofit/afblue.dat: Add blue zone data for Chakma. 3081 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3082 3083 * src/autofit/afscript.h: Add Chakma standard character. 3084 3085 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data. 3086 30872017-05-10 Sascha Brawer <sascha@google.com> 3088 Werner Lemberg <wl@gnu.org 3089 3090 [autofit] Add support for Kayah Li script. 3091 3092 * src/autofit/afblue.dat: Add blue zone data for Kayah Li. 3093 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3094 3095 * src/autofit/afscript.h: Add Kayah Li standard character. 3096 3097 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data. 3098 30992017-05-10 Sascha Brawer <sascha@google.com> 3100 Werner Lemberg <wl@gnu.org 3101 3102 [autofit] Add support for Bamum script. 3103 3104 * src/autofit/afblue.dat: Add blue zone data for Bamum. 3105 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3106 3107 * src/autofit/afscript.h: Add Bamum standard character. 3108 3109 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data. 3110 31112017-05-10 Sascha Brawer <sascha@google.com> 3112 Werner Lemberg <wl@gnu.org 3113 3114 [autofit] Add support for Saurashtra script. 3115 3116 * src/autofit/afblue.dat: Add blue zone data for Saurashtra. 3117 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3118 3119 * src/autofit/afscript.h: Add Saurashtra standard character. 3120 3121 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra 3122 data. 3123 31242017-05-10 Sascha Brawer <sascha@google.com> 3125 Werner Lemberg <wl@gnu.org 3126 3127 [autofit] Add support for Buhid script. 3128 3129 * src/autofit/afblue.dat: Add blue zone data for Buhid. 3130 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3131 3132 * src/autofit/afscript.h: Add Buhid standard character. 3133 3134 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data. 3135 31362017-05-08 Sascha Brawer <sascha@google.com> 3137 Werner Lemberg <wl@gnu.org 3138 3139 [autofit] Add support for Shavian script. 3140 3141 * src/autofit/afblue.dat: Add blue zone data for Shavian. 3142 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3143 3144 * src/autofit/afscript.h: Add Shavian standard character. 3145 3146 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data. 3147 31482017-05-08 Sascha Brawer <sascha@google.com> 3149 Werner Lemberg <wl@gnu.org 3150 3151 [autofit] Add support for Vai script. 3152 3153 * src/autofit/afblue.dat: Add blue zone data for Vai. 3154 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3155 3156 * src/autofit/afscript.h: Add Vai standard character. 3157 3158 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data. 3159 31602017-05-08 Sascha Brawer <sascha@google.com> 3161 Werner Lemberg <wl@gnu.org 3162 3163 [autofit] Add support for Osmanya script. 3164 3165 * src/autofit/afblue.dat: Add blue zone data for Osmanya. 3166 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3167 3168 * src/autofit/afscript.h: Add Osmanya standard character. 3169 3170 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data. 3171 31722017-05-08 Sascha Brawer <sascha@google.com> 3173 Werner Lemberg <wl@gnu.org 3174 3175 [autofit] Add support for Coptic script. 3176 3177 * src/autofit/afblue.dat: Add blue zone data for Coptic. 3178 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3179 3180 * src/autofit/afscript.h: Add Coptic standard character. 3181 3182 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data. 3183 31842017-05-08 Sascha Brawer <sascha@google.com> 3185 Werner Lemberg <wl@gnu.org 3186 3187 [autofit] Add support for Carian script. 3188 3189 * src/autofit/afblue.dat: Add blue zone data for Carian. 3190 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3191 3192 * src/autofit/afscript.h: Add Carian standard character. 3193 3194 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data. 3195 31962017-05-07 Werner Lemberg <wl@gnu.org> 3197 3198 [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). 3199 3200 Reported by Roy Tam <roytam@gmail.com>. 3201 3202 * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. 3203 32042017-05-07 Roy Tam <roytam@gmail.com> 3205 Werner Lemberg <wl@gnu.org> 3206 3207 [truetype] More tricky fonts (mainly from Dynalab). 3208 3209 * src/truetype/ttobjs.c (tt_check_trickyness_family, 3210 tt_check_trickyness_sfnt_ids): Add them. 3211 32122017-05-07 Werner Lemberg <wl@gnu.org> 3213 3214 [truetype] Add tricky font `DLCHayMedium' (from Dynalab). 3215 3216 Reported by Roy Tam <roytam@gmail.com>. 3217 3218 * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. 3219 32202017-05-03 Werner Lemberg <wl@gnu.org> 3221 3222 */*: s/backwards compatibility/backward compatibility/. 3223 32242017-05-03 Sascha Brawer <sascha@google.com> 3225 Werner Lemberg <wl@gnu.org 3226 3227 [autofit] Add support for Unified Canadian Syllabics script. 3228 3229 * src/autofit/afblue.dat: Add blue zone data for Unified Canadian 3230 Syllabics. 3231 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3232 3233 * src/autofit/afscript.h: Add Unified Canadian Syllabics standard 3234 character. 3235 3236 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified 3237 Canadian Syllabics data. 3238 32392017-05-03 Sascha Brawer <sascha@google.com> 3240 Werner Lemberg <wl@gnu.org> 3241 3242 [autofit] Add blue-zone support for Sundanese script. 3243 3244 This essentially moves the Sundanese script from the `Indic' hinter 3245 to the `Latin' hinter. 3246 3247 * src/autofit/afblue.dat: Add blue zone data for Sundanese. 3248 3249 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3250 3251 * src/autofit/afscript.h: Add Sundanese standard character and move 3252 data out of AF_CONFIG_OPTION_INDIC block. 3253 3254 * src/autofit/afranges.c: Move Sundanese data out of 3255 AF_CONFIG_OPTION_INDIC block. 3256 3257 * src/autofit/afstyles.h: Update Sundanese data; in particular, use 3258 AF_WRITING_SYSTEM_LATIN. 3259 32602017-05-03 Sascha Brawer <sascha@google.com> 3261 Werner Lemberg <wl@gnu.org 3262 3263 [autofit] Add support for Avestan script. 3264 3265 * src/autofit/afblue.dat: Add blue zone data for Avestan. 3266 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3267 3268 * src/autofit/afscript.h: Add Avestan standard character. 3269 3270 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data. 3271 32722017-05-02 Behdad Esfahbod <behdad@behdad.org> 3273 3274 [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). 3275 3276 When points are not touched by gvar interpolation deltas, FreeType 3277 gave a slightly different result than Apple's CoreText. 3278 3279 The OpenType working group will update the specification to document 3280 the following behaviour: If the two points with deltas to the `left' 3281 and `right' of the untouched point have the same coordinate, then 3282 the inferred delta for the untouched point should be zero. 3283 3284 * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new 3285 behaviour. 3286 32872017-05-02 Werner Lemberg <wl@gnu.org> 3288 3289 [autofit] Remove `slight' auto-hint mode again. 3290 3291 A poll on freetype-devel favoured changes directly applied to 3292 `light'. 3293 3294 * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, 3295 FT_RENDER_MODE_SLIGHT): Removed. 3296 3297 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c 3298 (af_latin_hints_init), src/autofit/aflatin2.c 3299 (af_latin2_hints_init): Revert change from 2017-04-22. 3300 3301 * src/autofit/afloader.c (af_loader_load_glyph) Remove references to 3302 FT_RENDER_MODE_SLIGHT. 3303 [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics 3304 unconditionally. 3305 3306 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from 3307 2017-04-22. 3308 3309 * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. 3310 3311 * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from 3312 2017-04-22. 3313 3314 * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from 3315 2017-04-22. 3316 3317 * docs/CHANGES: Updated. 3318 33192017-04-30 Werner Lemberg <wl@gnu.org> 3320 3321 [autofit] Fix metrics computation. 3322 3323 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and 3324 Nikolaus Waxweiler <madigens@gmail.com>. 3325 3326 * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of 3327 auto-hinter metrics. Without this change, multiple size changing 3328 calls for a single face fail. 3329 33302017-04-29 Werner Lemberg <wl@gnu.org> 3331 3332 * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. 3333 3334 Reported by Earnestly <zibeon@googlemail.com> in 3335 3336 https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html 3337 33382017-04-27 Werner Lemberg <wl@gnu.org> 3339 3340 Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. 3341 3342 * include/freetype/config/ftoption.h 3343 (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by 3344 default. 3345 3346 * src/autofit/afloader.c (af_loader_load_glyph): Use 3347 AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code. 3348 33492017-04-26 Werner Lemberg <wl@gnu.org> 3350 3351 * include/freetype/freetype.h (FT_Render_Mode): Fix order. 3352 3353 This retains backward compatibility. 3354 3355 Noted by Alexei. 3356 33572017-04-22 Werner Lemberg <wl@gnu.org> 3358 3359 [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). 3360 3361 * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to 3362 hold hinted metrics. 3363 Make `metrics' a pointer so that `tt_glyph_load' can easily switch 3364 between metrics. 3365 3366 * src/truetype/ttdriver.c (tt_size_request): Updated. 3367 (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is 3368 used. 3369 3370 * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, 3371 TT_Process_Composite_Component, load_truetype_glyph, 3372 compute_glyph_metrics, TT_Load_Glyph): Updated. 3373 3374 * src/truetype/ttinterp.c (TT_Load_Context): Updated. 3375 3376 * src/truetype/ttobjs.c (tt_size_reset): Updated. 3377 3378 * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. 3379 33802017-04-22 Werner Lemberg <wl@gnu.org> 3381 3382 Add new `slight' auto-hinting mode. 3383 3384 This mode uses fractional advance widths and doesn't scale glyphs 3385 horizontally, only applying vertical scaling and hinting. 3386 3387 At the same time, the behaviour of the `light' auto-hinter gets 3388 restored for backward compatibility: Both vertical and horizontal 3389 scaling is again based on rounded metrics values (this was changed 3390 in a commit from 2017-03-30 as a side effect). To be more precise, 3391 the behaviour is restored for TrueType fonts only; for other font 3392 formats like Type 1, this is a new feature of the `light' hinting 3393 mode. 3394 3395 * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. 3396 (FT_RENDER_MODE_SLIGHT): New render mode. 3397 3398 * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add 3399 `autohint_mode' and `autohint_metrics' fields. 3400 3401 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c 3402 (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): 3403 Updated. 3404 3405 * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use 3406 `autohint_metrics'. 3407 (af_loader_load_glyph): s/internal/slot_internal/. 3408 Initialize `autohint_metrics' and `autohint_mode' depending on 3409 current auto-hint mode. 3410 Use `autohint_metrics'. 3411 Updated. 3412 3413 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. 3414 3415 * src/base/ftobjs.c (FT_Load_Glyph): Updated. 3416 (FT_New_Size): Allocate `internal' object. 3417 3418 * src/pshinter/pshalgo.c (ps_hints_apply): Updated. 3419 3420 * src/smooth/ftsmooth.c (ft_smooth_render): Updated. 3421 34222017-04-22 Werner Lemberg <wl@gnu.org> 3423 3424 Introduce `FT_Size_InternalRec' structure. 3425 3426 We are going to extend this later on. 3427 3428 * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New 3429 structure with a single field `module_data'. 3430 3431 * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of 3432 `FT_Size' structure. 3433 3434 * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use 3435 `size->internal->module_data' instead of `size->internal'. 3436 3437 * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. 3438 (cff_size_init, cff_size_select, cff_size_request): Use 3439 `size->internal->module_data' instead of `size->internal'. 3440 3441 * src/cif/cidobjs.c (cid_size_done, cid_size_init, 3442 cid_size_request): Use `size->internal->module_data' instead of 3443 `size->internal'. 3444 3445 * src/psaux/psobjs.c (t1_builder_ini): Use 3446 `size->internal->module_data' instead of `size->internal'. 3447 3448 * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): 3449 Use `size->internal->module_data' instead of `size->internal'. 3450 34512017-04-21 Alexei Podtelezhnikov <apodtele@gmail.com> 3452 3453 * src/smooth/ftsmooth.h: Remove unused guards and declaration. 3454 34552017-04-16 Hin-Tak Leung <htl10@users.sourceforge.net> 3456 3457 Fix tracing messages. 3458 3459 * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, 3460 FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print 3461 correct function name. 3462 34632017-04-08 Sascha Brawer <sascha@google.com> 3464 Werner Lemberg <wl@gnu.org 3465 3466 [autofit] Add support for Old Turkic script. 3467 3468 * src/autofit/afblue.dat: Add blue zone data for Old Turkic. 3469 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3470 3471 * src/autofit/afscript.h: Add Old Turkic standard characters. 3472 3473 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data. 3474 34752017-04-08 Sascha Brawer <sascha@google.com> 3476 Werner Lemberg <wl@gnu.org 3477 3478 [autofit] Add support for Gothic script. 3479 3480 * src/autofit/afblue.dat: Add blue zone data for Gothic. 3481 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3482 3483 * src/autofit/afscript.h: Add Gothic standard characters. 3484 3485 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data. 3486 34872017-04-08 Sascha Brawer <sascha@google.com> 3488 Werner Lemberg <wl@gnu.org 3489 3490 [autofit] Add support for Cypriot script. 3491 3492 * src/autofit/afblue.dat: Add blue zone data for Cypriot. 3493 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3494 3495 * src/autofit/afscript.h: Add Cypriot standard characters. 3496 3497 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data. 3498 34992017-04-08 Sascha Brawer <sascha@google.com> 3500 Werner Lemberg <wl@gnu.org 3501 3502 [autofit] Add support for Deseret script. 3503 3504 * src/autofit/afblue.dat: Add blue zone data for Deseret. 3505 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3506 3507 * src/autofit/afscript.h: Add Deseret standard characters. 3508 3509 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data. 3510 35112017-04-07 Werner Lemberg <wl@gnu.org> 3512 3513 [autofit] Fix invalid character range description (#50745). 3514 3515 Also reported as 3516 3517 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 3518 3519 * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in 3520 recent commit. 3521 35222017-04-07 Werner Lemberg <wl@gnu.org> 3523 3524 [ftfuzzer] Fix clang warnings. 3525 3526 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add 3527 casts. 3528 35292017-04-06 Sascha Brawer <sascha@google.com> 3530 Werner Lemberg <wl@gnu.org 3531 3532 [autofit] Add support for Lisu script. 3533 3534 * src/autofit/afblue.dat: Add blue zone data for Lisu. 3535 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3536 3537 * src/autofit/afscript.h: Add Lisu standard characters. 3538 3539 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data. 3540 35412017-04-06 Sascha Brawer <sascha@google.com> 3542 Werner Lemberg <wl@gnu.org 3543 3544 [autofit] Add support for Osage script. 3545 3546 * src/autofit/afblue.dat: Add blue zone data for Osage. 3547 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3548 3549 * src/autofit/afscript.h: Add Osage standard characters. 3550 3551 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data. 3552 35532017-04-06 Sascha Brawer <sascha@google.com> 3554 Werner Lemberg <wl@gnu.org 3555 3556 [autofit] Add support for Glagolitic script. 3557 3558 * src/autofit/afblue.dat: Add blue zone data for Glagolitic. 3559 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3560 3561 * src/autofit/afscript.h: Add Glagolitic standard characters. 3562 3563 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data. 3564 35652017-04-06 Sascha Brawer <sascha@google.com> 3566 Werner Lemberg <wl@gnu.org 3567 3568 [autofit] Add support for Tai Viet script. 3569 3570 * src/autofit/afblue.dat: Add blue zone data for Tai Viet. 3571 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3572 3573 * src/autofit/afscript.h: Add Tai Viet standard characters. 3574 3575 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data. 3576 35772017-04-06 Sascha Brawer <sascha@google.com> 3578 Werner Lemberg <wl@gnu.org 3579 3580 [autofit] Add support for Tifinagh script. 3581 3582 * src/autofit/afblue.dat: Add blue zone data for Tifinagh. 3583 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3584 3585 * src/autofit/afscript.h: Add Tifinagh standard characters. 3586 3587 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data. 3588 35892017-04-06 Sascha Brawer <sascha@google.com> 3590 Werner Lemberg <wl@gnu.org 3591 3592 [autofit] Add support for N'Ko script. 3593 3594 * src/autofit/afblue.dat: Add blue zone data for N'Ko. 3595 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3596 3597 * src/autofit/afscript.h: Add N'Ko standard characters. 3598 3599 * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data. 3600 36012017-04-06 Sascha Brawer <sascha@google.com> 3602 3603 [autofit] Add support for Adlam script. 3604 3605 * src/autofit/afblue.dat: Add blue zone data for Adlam. 3606 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3607 3608 * src/autofit/afscript.h: Add Adlam standard characters. 3609 3610 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. 3611 36122017-04-06 Sascha Brawer <sascha@google.com> 3613 3614 [autofit] Add support for Ol Chiki script. 3615 3616 * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. 3617 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 3618 3619 * src/autofit/afscript.h: Add Ol Chiki standard character. 3620 3621 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. 3622 36232017-04-03 Werner Lemberg <wl@gnu.org> 3624 3625 [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. 3626 3627 Reported as 3628 3629 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 3630 3631 * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New 3632 error code. 3633 3634 * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution 3635 of these two opcodes in `glyf' bytecode. 3636 (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode 3637 in case of error since function tables can no longer be modified 3638 (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can 3639 enormously speed up handling of broken fonts. 3640 36412017-04-02 Alexei Podtelezhnikov <apodtele@gmail.com> 3642 3643 [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. 3644 3645 * src/autofit/aflatin.c (af_latin_hints_init): Updated. 3646 * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. 3647 36482017-04-01 Werner Lemberg <wl@gnu.org> 3649 3650 * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. 3651 3652 Otherwise FT_UINT_TO_POINTER might not be defined. 3653 3654 Problem reported by Alexei. 3655 36562017-03-31 Alexei Podtelezhnikov <apodtele@gmail.com> 3657 3658 [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. 3659 3660 * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. 3661 * src/autofit/afcjk.c (af_cjk_hints_init): Updated. 3662 * src/autofit/aflatin.c (af_latin_hints_init): Ditto. 3663 * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. 3664 36652017-03-31 Werner Lemberg <wl@gnu.org> 3666 3667 * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. 3668 3669 Allow CFFs containing a single font to have an empty font name. 3670 3671 Problem reported by 張俊芝 <418092625@qq.com> in 3672 3673 https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html 3674 36752017-03-30 Werner Lemberg <wl@gnu.org> 3676 3677 * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. 3678 3679 Requested by Dave Arnold. 3680 36812017-03-30 Werner Lemberg <wl@gnu.org> 3682 3683 [truetype] Fix HVAR and VVAR handling (#50678). 3684 3685 * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle 3686 glyph indices larger than `mapCount' as described in the 3687 specification. 3688 36892017-03-30 Werner Lemberg <wl@gnu.org> 3690 3691 [truetype] Allow linear scaling for unhinted rendering (#50470). 3692 3693 * src/truetype/ttdriver.c (tt_size_request): Revert change from 3694 2011-07-16; the intended metrics fix seems now to be implemented in 3695 a different way, making the patch unnecessary. Note that this 3696 change was usually patched out by all major GNU/Linux distributions 3697 due to heavy side effects. 3698 3699 * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): 3700 Refer to the metrics of the `TT_Size' object. 3701 37022017-03-29 Werner Lemberg <wl@gnu.org> 3703 3704 [truetype] Fix thinko related to PS name of default named instance. 3705 3706 * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are 3707 name ID values, not indices into the array of name entries. 3708 37092017-03-27 Werner Lemberg <wl@gnu.org> 3710 3711 [cid, truetype] Don't use `index' as a variable name. 3712 3713 At least on FreeBSD there is a global declaration of `index' in file 3714 `/usr/include/strings.h'. 3715 3716 * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where 3717 appropriate. 3718 37192017-03-27 Wojciech Mamrak <wmamrak@gmail.com> 3720 3721 [sfnt] Minor improvement for handling kern tables. 3722 3723 * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for 3724 cross-stream kerning tables since we reject format 2 tables later 3725 on anyways. 3726 Modify code for limit test... 3727 (tt_face_get_kerning): ... to avoid a limit test here. 3728 37292017-03-27 Werner Lemberg <wl@gnu.org> 3730 3731 [pcf] Fix compiler warnings. 3732 3733 Reported by Alexander Hedges <ahedges@student.ethz.ch>. 3734 3735 * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag 3736 `property_name' with `FT_UNUSED' where necessary. 3737 37382017-03-26 Werner Lemberg <wl@gnu.org> 3739 3740 * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. 3741 3742 Reported as 3743 3744 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 3745 37462017-03-23 Werner Lemberg <wl@gnu.org> 3747 3748 [psaux] Better protect `flex' handling. 3749 3750 Reported as 3751 3752 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 3753 3754 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) 3755 <callothersubr>: Since there is not a single flex operator but a 3756 series of subroutine calls, malformed fonts can call arbitrary other 3757 operators after the start of a flex, possibly adding points. For 3758 this reason we have to check the available number of points before 3759 inserting a point. 3760 37612017-03-23 Werner Lemberg <wl@gnu.org> 3762 3763 [sfnt] Fix check for default named instance. 3764 3765 * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four 3766 bytes, not two... 3767 37682017-03-23 Werner Lemberg <wl@gnu.org> 3769 3770 Make MM fonts work (again). 3771 3772 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, 3773 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore 3774 return value of `ft_face_get_mvar_service'; instead, check whether a 3775 service is actually returned. 3776 37772017-03-20 Werner Lemberg <wl@gnu.org> 3778 3779 [truetype] Some variable renamings. 3780 3781 Too much local variables holding different structures were called 3782 `metrics'. 3783 3784 * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. 3785 3786 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, 3787 compute_glyph_metrics): s/metrics/incr_metrics/. 3788 (load_sbit_image): s/metrics/sbit_metrics/. 3789 3790 * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. 3791 (tt_size_init_bytecode): s/metrics/tt_metrics/. 3792 (tt_size_reset): s/metrics/size_metrics/. 3793 37942017-03-20 Werner Lemberg <wl@gnu.org> 3795 3796 [sfnt] Don't add instances to non-variation fonts. 3797 3798 * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. 3799 38002017-03-20 Werner Lemberg <wl@gnu.org> 3801 3802 * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). 3803 38042017-03-18 Werner Lemberg <wl@gnu.org> 3805 3806 Introduce FT_UINT_TO_POINTER macro (#50560). 3807 3808 We have to make a separate case for Windows 64's LLP64 data model. 3809 3810 * builds/unix/ftconfig.in, builds/vms/ftconfig.h, 3811 include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. 3812 3813 * src/truetype/ttgload.c (load_truetype_glyph): Use it. 3814 38152017-03-18 Werner Lemberg <wl@gnu.org> 3816 3817 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). 3818 3819 The problematic font that exceeds the old limit is Lato-Regular, 3820 version 2.007, containing bytecode generated by a buggy version of 3821 ttfautohint. 3822 38232017-03-18 Werner Lemberg <wl@gnu.org> 3824 3825 [truetype] Another limitation for bytecode loop count maximum. 3826 3827 Reported as 3828 3829 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 3830 3831 * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' 3832 by number of glyphs also. 3833 38342017-03-18 Werner Lemberg <wl@gnu.org> 3835 3836 [ftfuzzer] Minor improvement. 3837 3838 * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if 3839 bitmap strikes are active. 3840 38412017-03-18 Werner Lemberg <wl@gnu.org> 3842 3843 Improve `make multi'. 3844 3845 * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. 3846 3847 * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. 3848 3849 * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. 3850 3851 * src/sfnt/pngshim.c: Guard file with 3852 TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. 3853 3854 * src/sfnt/ttbdf.c: Avoid empty source file. 3855 * src/sfnt/ttpost.c: Guard file with 3856 TT_CONFIG_OPTION_POSTSCRIPT_NAMES. 3857 * src/sfnt/ttsbit.c: Guard file with 3858 TT_CONFIG_OPTION_EMBEDDED_BITMAPS. 3859 3860 * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty 3861 source file. 3862 3863 * src/truetype/ttsubpix.c: Guard file with 3864 TT_USE_BYTECODE_INTERPRETER also. 3865 3866 * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. 3867 3868 * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, 3869 src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, 3870 src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, 3871 src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, 3872 src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, 3873 src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort 3874 entries. 3875 38762017-03-17 Werner Lemberg <wl@gnu.org> 3877 3878 Fixes for conditional compilation. 3879 3880 * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' 3881 earlier. 3882 3883 * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into 3884 TT_CONFIG_OPTION_GX_VAR_SUPPORT block. 3885 (sfnt_done_face): Protect some code with 3886 TT_CONFIG_OPTION_GX_VAR_SUPPORT. 3887 3888 * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler 3889 warning. 3890 3891 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable 3892 into TT_USE_BYTECODE_INTERPRETER block. 3893 3894 (tt_loader_init): Put `error' variable into 3895 TT_USE_BYTECODE_INTERPRETER block. 3896 38972017-03-17 Werner Lemberg <wl@gnu.org> 3898 3899 Fix preprocessor warning. 3900 3901 * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether 3902 TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its 3903 value. 3904 39052017-03-17 Werner Lemberg <wl@gnu.org> 3906 3907 `make multi' fixes; compiler warnings. 3908 3909 * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. 3910 3911 * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include 3912 FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. 3913 3914 * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include 3915 FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. 3916 (get_win_string, get_apple_string): Initialize `result'. 3917 39182017-03-17 Dave Arnold <darnold@adobe.com> 3919 3920 [cff] Fix potential bugs in default NDV for CFF2. 3921 3922 * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend 3923 vector when `lenNDV' is zero; don't rely on zero-init. 3924 Save `lenNDV' as part of cache key even when `lenNDV' is zero. 3925 39262017-03-17 Dave Arnold <darnold@adobe.com> 3927 3928 [cff] Fix CFF2 stack allocation. 3929 3930 * src/cff/cffparse.c (cff_parser_init) add 1 for operator. 3931 39322017-03-16 Werner Lemberg <wl@gnu.org> 3933 3934 * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. 3935 3936 Reported as 3937 3938 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 3939 39402017-03-15 Werner Lemberg <wl@gnu.org> 3941 3942 Remove clang compiler warnings (#50548). 3943 3944 * include/freetype/internal/tttypes.h (TT_FaceRec): Make 3945 `var_postscript_prefix_len' unsigned. 3946 3947 * src/autofit/afwarp.c (af_warper_compute_line_best): Remove 3948 redundant assignment. 3949 3950 * src/cff/cffload.c (cff_subfont_load): Add casts. 3951 3952 * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. 3953 3954 * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' 3955 keyword. 3956 Add casts. 3957 (fixed2float): Add cast. 3958 (sfnt_get_var_ps_name): Make `p' always initialized. 3959 Add casts. 3960 3961 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. 3962 39632017-03-15 Werner Lemberg <wl@gnu.org> 3964 3965 [ftfuzzer] Limit number of tested faces and instances. 3966 3967 This is inspired by the discussion in and analysis of 3968 3969 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 3970 3971 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only 3972 up to 20 face indices. 3973 Use only up to 20 instance indices. 3974 39752017-03-15 Werner Lemberg <wl@gnu.org> 3976 3977 * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. 3978 39792017-03-14 Werner Lemberg <wl@gnu.org> 3980 3981 [sfnt] Implement PS names for font instances [3/3]. 3982 3983 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 3984 3985 * include/freetype/internal/tttypes.h (TT_FaceRec): New fields 3986 `var_postscript_prefix' and `var_postscript_prefix_len'. 3987 3988 * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. 3989 (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. 3990 (get_win_string, get_apple_string): Remove `const' from return 3991 value. 3992 (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. 3993 (hexdigits): New array. 3994 (sfnt_get_var_ps_name): New function, implementing Adobe TechNote 3995 5902 to construct a PS name for a variation font instance. 3996 (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. 3997 3998 * src/sfnt/sfobjs.c (sfnt_done_face): Updated. 3999 4000 * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset 4001 `face->postscript_name' to trigger recalculation for new instance 4002 parameters. 4003 40042017-03-14 Werner Lemberg <wl@gnu.org> 4005 4006 [sfnt] Implement PS names for font instances [2/3]. 4007 4008 * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: 4009 New function to find the shortest representation of a 16.16 4010 fractional number. 4011 40122017-03-14 Werner Lemberg <wl@gnu.org> 4013 4014 [sfnt] Implement PS names for font instances [1/3]. 4015 4016 Add 128bit MurmurHash 3 function. 4017 4018 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 4019 4020 * src/sfnt/sfdriver.c (ROTL32): New macro. 4021 (fmix32, murmur_hash_3_128): New functions. 4022 40232017-03-13 Werner Lemberg <wl@gnu.org> 4024 4025 [truetype] Ignore invalid MVAR tags. 4026 4027 Reported as 4028 4029 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 4030 4031 * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit 4032 warning for invalid tags. 4033 (tt_apply_mvar): Ignore invalid tags. 4034 40352017-03-12 Werner Lemberg <wl@gnu.org> 4036 4037 [truetype] Store and use design coordinates also. 4038 4039 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): 4040 Add `normalizedcoords' argument. 4041 4042 * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store 4043 the design coordinates of the current instance. 4044 Updated. 4045 4046 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... 4047 (tt_set_mm_blend): ... New function. 4048 Convert data in `normalizedcoords' array to `coords' array on 4049 demand. 4050 (TT_Set_Var_Design): Store argument data in `coords' array. 4051 (TT_Get_Var_Design): Get data from `coords' array. 4052 (tt_get_var_blend): Updated. 4053 (tt_done_blend): Updated. 4054 4055 * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. 4056 4057 * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. 4058 4059 * src/cff/cffobjs.c (cff_face_init): Updated. 4060 40612017-03-12 Werner Lemberg <wl@gnu.org> 4062 4063 src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. 4064 40652017-03-08 Werner Lemberg <wl@gnu.org> 4066 4067 [sfnt] Another fix for buggy variation fonts. 4068 4069 Reported as 4070 4071 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 4072 4073 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of 4074 instances to zero for `CFF' fonts table, ensure that there is no 4075 `CFF2' present also (which gets priority). 4076 40772017-03-07 Werner Lemberg <wl@gnu.org> 4078 4079 [sfnt] Improve handling for buggy variation fonts. 4080 4081 Reported as 4082 4083 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 4084 4085 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of 4086 instances to zero for `CFF' fonts table, ensure that there is no 4087 `glyf' table present also (which gets priority). 4088 40892017-03-06 Werner Lemberg <wl@gnu.org> 4090 4091 [sfnt, truetype] Always provide default instance. 4092 4093 As documented in the OpenType specification, an entry for the 4094 default instance may be omitted in the named instance table. In 4095 particular this means that even if there is no named instance table 4096 in the font we actually do have a named instance, namely the default 4097 instance. 4098 4099 For consistency, we always want the default instance in our list of 4100 named instances. If it is missing, we try to synthesize it. 4101 4102 * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default 4103 instance is in the table of named instances. Otherwise adjust 4104 number of instances. 4105 4106 * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. 4107 (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named 4108 instances. 4109 Sythesize a named instance entry if necessary. 4110 (tt_done_blend): Free `normalized_stylecoords'. 4111 41122017-03-05 Werner Lemberg <wl@gnu.org> 4113 4114 [sfnt] Remove redundant code. 4115 4116 * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for 4117 `num_instances', which will always succeed. 4118 41192017-03-04 Werner Lemberg <wl@gnu.org> 4120 4121 [sfnt] Add `get_name_id' service. 4122 4123 * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New 4124 typedef. 4125 (SFNT_Interface): Add `get_name_id' field. 4126 (FT_DEFINE_SFNT_INTERFACE): Updated. 4127 4128 * src/sfnt/sfdriver.c (search_name_id): Rename to... 4129 (sfnt_get_name_id): ... this. 4130 (sfnt_get_ps_name, sfnt_interface): Updated. 4131 41322017-03-04 Werner Lemberg <wl@gnu.org> 4133 4134 [truetype] Make `TT_Set_MM_Blend' set named instance index. 4135 4136 * src/truetype/ttgxvar.h (GX_Blend): New array 4137 `normalized_stylecoords'. 4138 4139 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill 4140 `normalized_stylecoords'. 4141 (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' 4142 accordingly. 4143 41442017-03-02 Werner Lemberg <wl@gnu.org> 4145 4146 [truetype] Split off designer/normalized conversion routines. 4147 4148 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion 4149 code designer->normalized coordinates to... 4150 (ft_var_to_normalized): ... New function. 4151 (TT_Get_Var_Design): Split off conversion code normalized->designer 4152 coordinates to... 4153 (ft_var_to_design): ... New function. 4154 41552017-02-28 Werner Lemberg <wl@gnu.org> 4156 4157 [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. 4158 4159 * src/sfnt/sfdriver.c (sfnt_ps_map): New array. 4160 (sfnt_is_postscript): New function. 4161 (char_type_func): New typedef. 4162 (get_win_string, get_apple_string): Add argument to specify 4163 character checking function. 4164 Add argument whether argument checking failures should be reported. 4165 Update callers. 4166 (search_name_id): Fix return value. 4167 41682017-02-23 Werner Lemberg <wl@gnu.org> 4169 4170 [sfnt] Split off another bit of `sfnt_get_ps_name'. 4171 4172 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some 4173 functionality into... 4174 (search_name_id): ... New function. 4175 41762017-02-23 Werner Lemberg <wl@gnu.org> 4177 4178 [sfnt] Modularize `sfnt_get_ps_name'. 4179 4180 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some 4181 functionality into... 4182 (IS_WIN, IS_APPLE): ... New macros. 4183 (get_win_string, get_apple_string): ... New functions. 4184 41852017-02-23 Werner Lemberg <wl@gnu.org> 4186 4187 [truetype] Minor improvement. 4188 4189 * src/truetype/ttgload.c (TT_Process_Simple_Glyph, 4190 load_truetype_glyph): Remove unnecessary tests. 4191 41922017-02-23 Werner Lemberg <wl@gnu.org> 4193 4194 * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. 4195 4196 For orthogonality with other structure field names. 4197 4198 Update all users. 4199 42002017-02-22 Alexei Podtelezhnikov <apodtele@gmail.com> 4201 4202 * src/smooth/ftgrays.c (gray_hline): Improve code. 4203 42042017-02-20 Dominik Röttsches <drott@google.com> 4205 4206 Fix some `ttnameid.h' entries (#50313). 4207 4208 * include/freetype/ttnameid.h: 4209 s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, 4210 s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. 4211 42122017-02-20 Werner Lemberg <wl@gnu.org> 4213 4214 [cff] Finish support for `random' operator. 4215 4216 * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. 4217 4218 * src/cff/cffobjs.c: Updated. 4219 (cff_driver_init): Initialize random seed value. 4220 4221 * src/cff/cffload.c (cff_random): New function. 4222 (cff_subfont_load): Add `face' argument. 4223 Update all callers. 4224 Initialize random number generator with a proper seed value. 4225 (cff_font_load): Add `face' argument. 4226 Update all callers. 4227 4228 * src/cff/cffload.h: Updated. 4229 4230 * src/cff/cf2intrp.c (CF2_FIXME): Removed. 4231 (cf2_interpT2CharString) <cf2_escRANDOM>: Implement opcode. 4232 4233 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't 4234 initialize random seed value. 4235 <cff_op_random>: Use new random seed framework. 4236 42372017-02-20 Werner Lemberg <wl@gnu.org> 4238 4239 [cff] Sanitize `initialRandomSeed'. 4240 4241 * src/cff/cffload.c (cff_load_private_dict): Make 4242 `initial_random_seed' value always positive. 4243 42442017-02-20 Werner Lemberg <wl@gnu.org> 4245 4246 [cff] Introduce `random-seed' property (2/2). 4247 4248 * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. 4249 (open_face): Initialize `face->internal->random_seed'. 4250 (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. 4251 4252 * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' 4253 property. 4254 42552017-02-20 Werner Lemberg <wl@gnu.org> 4256 4257 [cff] Introduce `random-seed' property (1/2). 4258 4259 We need this for support of the `random' operator. 4260 4261 * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. 4262 4263 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New 4264 field `random_seed'. 4265 4266 * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'. 4267 42682017-02-17 Werner Lemberg <wl@gnu.org> 4269 4270 Remove clang warnings. 4271 4272 * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' 4273 keyword. 4274 4275 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, 4276 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): 4277 Initialize some variables. 4278 42792017-02-16 Nikolaus Waxweiler <madigens@gmail.com> 4280 Werner Lemberg <wl@gnu.org> 4281 4282 Add face property for stem darkening. 4283 4284 * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New 4285 macro. 4286 4287 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add 4288 `no_stem_darkening' field. 4289 4290 * src/autofit/afloader.c (af_loader_load_glyph), 4291 src/autofit/afmodule.c (af_property_set): Updated. 4292 4293 * src/base/ftobjs.c: Include FT_AUTOHINTER_H. 4294 (ft_open_face_internal): Updated. 4295 (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. 4296 4297 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. 4298 4299 * src/cff/cffdrivr.c (cff_property_set): Updated. 4300 43012017-02-16 Nikolaus Waxweiler <madigens@gmail.com> 4302 Werner Lemberg <wl@gnu.org> 4303 4304 Add face property for LCD filter weights. 4305 4306 * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, 4307 FT_LCD_FILTER_FIVE_TAPS): New macros. 4308 (FT_LcdFiveTapFilter): New typedef. 4309 4310 * include/freetype/ftobjs.h (FT_Face_InternalRec) 4311 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. 4312 (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. 4313 (ft_lcd_filter_fir): New prototype. 4314 (FT_LibraryRec): Updated. 4315 4316 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... 4317 (ft_lcd_filter_fir): ... this base function. 4318 Updated. 4319 (_ft_lcd_filter_legacy): Updated. 4320 (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. 4321 4322 * src/base/ftobjs.c (ft_open_face_internal): Updated. 4323 (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. 4324 4325 * src/smooth/ftsmooth.c (ft_smooth_render_generic) 4326 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from 4327 `FT_Face_Internal'. 4328 43292017-02-14 Nikolaus Waxweiler <madigens@gmail.com> 4330 Werner Lemberg <wl@gnu.org> 4331 4332 Add new function `FT_Face_Properties'. 4333 4334 This commit provides the framework, to be filled with something 4335 useful in the next commits. 4336 4337 * include/freetype/freetype.h (FT_Face_Properties): Declare. 4338 4339 * src/base/ftobjs.c (FT_Face_Properties): New function. 4340 43412017-02-13 Werner Lemberg <wl@gnu.org> 4342 4343 [autofit] Prevent overlapping blue zones. 4344 4345 Problem reported as 4346 4347 https://github.com/google/fonts/issues/632 4348 4349 The font in question (Nunito) has values 705 and 713 for the 4350 reference and overshoot values, respectively, of the first blue 4351 zone. Blue zone 2, however, has value 710 for both the reference 4352 and overshoot. At 12ppem, reference and overshoot of blue zone 0 4353 becomes 8px, while blue zone 2 becomes 9px. 4354 4355 A peculiarity of this font is that the tops of isolated vertical 4356 stems like `N' have a slight overshoot also. The auto-hinter tries 4357 to find the nearest blue zone using the *original* coordinates. For 4358 vertical stems, this is value 713. For normal horizontal tops like 4359 in character `E', this is value 710. Since value 713 is mapped to 4360 8px but value 710 to 9px, `N' and similar characters are one pixel 4361 higher than `E', which looks very bad. 4362 4363 This commit sanitizes blue zones to avoid such a behaviour. 4364 4365 * src/autofit/aflatin.c (af_latin_sort_blue): New function. 4366 (af_latin_metrics_init_blues): Sort blue values and remove overlaps. 4367 43682017-02-12 Alexei Podtelezhnikov <apodtele@gmail.com> 4369 4370 * src/smooth/ftgrays.c (gray_sweep): Improve code. 4371 43722017-02-06 Werner Lemberg <wl@gnu.org> 4373 4374 [truetype] Implement `VVAR' table support. 4375 4376 * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... 4377 (GX_HVVarTable): ...This. 4378 (GX_Blend): Add fields for `VVAR' table handling. 4379 Other minor updates. 4380 4381 * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... 4382 (ft_var_load_hvvar): ...This. 4383 Handle VVAR loading also (controlled by an additional parameter). 4384 (tt_hadvance_adjust): Renamed to... 4385 (tt_hvadvance_adjust): ...This. 4386 Handle application of advance height also (controlled by an 4387 additional parameter). 4388 (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for 4389 `tt_hvadvance_adjust'. 4390 4391 * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. 4392 43932017-02-05 Werner Lemberg <wl@gnu.org> 4394 4395 [autofit] Use better blue zone characters for lowercase latin. 4396 4397 The number of lowercase characters for computing the top flat blue 4398 zone value was too small (in most cases only `x' and `z'). If one 4399 of the two characters has a large serif, say, it can happen that 4400 FreeType must select between two different values, having a 50% 4401 chance to use the wrong one. As a result, rendering at larger PPEM 4402 values could yield uneven lowercase glyph heights. 4403 4404 Problem reported by Christoph Koeberlin <christoph@koe.berlin>. 4405 4406 * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced 4407 with... 4408 (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): 4409 ... New, extended sets. 4410 (AF_BLUE_STRINGSET_LATN): Updated. 4411 4412 * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. 4413 44142017-02-04 Werner Lemberg <wl@gnu.org> 4415 4416 Make `freetype-config' a wrapper of `pkg-config' if possible. 4417 4418 Based on ideas taken from 4419 4420 http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch 4421 http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch 4422 4423 * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to 4424 set output variables if program is available. 4425 4426 * docs/CHANGES, docs/freetype-config.1: Updated. 4427 44282017-02-04 Werner Lemberg <wl@gnu.org> 4429 4430 * builds/unix/unix-def.in (freetype-config): Fix permissions. 4431 44322017-02-03 Werner Lemberg <wl@gnu.org> 4433 4434 * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. 4435 44362017-02-03 Werner Lemberg <wl@gnu.org> 4437 4438 * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. 4439 4440 Reported by Behdad. 4441 44422017-02-02 Werner Lemberg <wl@gnu.org> 4443 4444 [truetype] Fix MVAR post-action handling. 4445 4446 Reported as 4447 4448 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 4449 4450 * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This 4451 is important to make `tt_size_reset_iterator' (called in 4452 `tt_apply_mvar') always work. 4453 44542017-02-02 Werner Lemberg <wl@gnu.org> 4455 4456 Make compilation with FT_CONFIG_OPTION_PIC work again. 4457 4458 All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. 4459 4460 * include/freetype/internal/services/svmetric.h 4461 (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. 4462 4463 * src/autofit/aflatin.c (af_latin_hints_compute_edges, 4464 af_latin_hint_edges): Provide `globals' variable. 4465 4466 * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing 4467 variable. 4468 4469 * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, 4470 AF_STYLE_CLASSES_GET): Redefine. 4471 4472 * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. 4473 4474 * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. 4475 4476 * src/cff/cffpic.h (CffModulePIC): Fix typo. 4477 44782017-01-31 Alexei Podtelezhnikov <apodtele@gmail.com> 4479 4480 * src/smooth/ftgrays.c (gray_render_scanline): Improve code. 4481 44822017-01-31 Werner Lemberg <wl@gnu.org> 4483 4484 [cff] Provide metrics variation service interface (#50196). 4485 4486 Only now I've got an OTF with an HVAR table for testing... 4487 4488 The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the 4489 metrics variations interface. However, this didn't work with 4490 `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. 4491 4492 * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. 4493 (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for 4494 metric service functions from the `truetype' module. 4495 (cff_service_metrics_variations): New service. 4496 (cff_services): Updated. 4497 4498 * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. 4499 [FT_CONFIG_OPTION_PIC]: Synchronize code. 4500 4501 * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to 4502 FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always 4503 load the service from the `truetype' module. 4504 45052017-01-31 Werner Lemberg <wl@gnu.org> 4506 4507 Add framework to support services with 9 functions. 4508 4509 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): 4510 New macro. 4511 45122017-01-31 Werner Lemberg <wl@gnu.org> 4513 4514 [base] Fix error handing in MM functions. 4515 4516 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, 4517 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): 4518 Implement it. 4519 45202017-01-31 Werner Lemberg <wl@gnu.org> 4521 4522 [truetype] Fix sanity check for `gvar' table (#50184). 4523 4524 * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing 4525 variation data for some glyphs. 4526 45272017-01-31 Werner Lemberg <wl@gnu.org> 4528 4529 [autofit] Avoid uninitialized jumps (#50191). 4530 4531 * src/autofit/afcjk.c (af_cjk_metrics_check_digits), 4532 src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize 4533 `advance'. 4534 45352017-01-27 Werner Lemberg <wl@gnu.org> 4536 4537 s/GB2312/PRC/. 4538 4539 * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. 4540 (FT_ENCODING_GB2312): Deprecated. 4541 4542 * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. 4543 (TT_MS_ID_GB2312): Deprecated. 4544 4545 * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. 4546 4547 * docs/CHANGES: Updated. 4548 45492017-01-26 Werner Lemberg <wl@gnu.org> 4550 4551 [base] Add `FT_Get_Sfnt_LangTag' function. 4552 4553 * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. 4554 (FT_Get_Sfnt_LangTag): New declaration. 4555 4556 * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New function. 4557 4558 * docs/CHANGES: Updated. 4559 45602017-01-26 Werner Lemberg <wl@gnu.org> 4561 4562 [sfnt] Support `name' table format 1. 4563 4564 * include/freetype/internal/tttypes.h (TT_LangTagRec): New 4565 structure. 4566 (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. 4567 4568 * src/sfnt/ttload.c (tt_face_load_name): Add support for language 4569 tags. 4570 Reduce array size of name strings in case of invalid entries. 4571 (tt_face_free_name): Updated. 4572 4573 * docs/CHANGES: Updated. 4574 45752017-01-25 Werner Lemberg <wl@gnu.org> 4576 4577 [sfnt] s/TT_NameEntry/TT_Name/. 4578 4579 * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed 4580 to... 4581 (TT_NameRec): This. 4582 (TT_NameTableRec): Updated. 4583 4584 * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. 4585 4586 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. 4587 4588 * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, 4589 tt_name_entry_ascii_from_other): Renamed to... 4590 (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, 4591 respectively. 4592 (TT_NameEntry_ConvertFunc): Renamed to... 4593 (TT_Name_ConvertFunc): This. 4594 (tt_face_get_name): Updated. 4595 4596 * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): 4597 Updated. 4598 45992017-01-24 Werner Lemberg <wl@gnu.org> 4600 4601 [sfnt] Fix Postscript name service for symbol fonts. 4602 4603 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 4604 entries also. 4605 46062017-01-24 Werner Lemberg <wl@gnu.org> 4607 4608 [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. 4609 4610 * include/freetype/ftsnames.h 4611 (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, 4612 FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. 4613 (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, 4614 FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. 4615 4616 * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, 4617 TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. 4618 (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): 4619 Deprecated. 4620 4621 * src/sfnt/sfobjs.c (sfnt_load_face): Updated. 4622 4623 * docs/CHANGES: Updated. 4624 46252017-01-23 Werner Lemberg <wl@gnu.org> 4626 4627 [base] Add `FT_Set_Default_Properties' (#49187). 4628 4629 * include/freetype/ftmodapi.h: Add declaration. 4630 4631 * src/base/ftinit.c (ft_set_default_properties): Renamed to... 4632 (FT_Set_Default_Properties): ... this. 4633 (FT_Init_FreeType): Updated. 4634 4635 * docs/CHANGES: Updated. 4636 46372017-01-23 Werner Lemberg <wl@gnu.org> 4638 4639 [truetype] Minor updates for OpenType 1.8.1. 4640 4641 * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been 4642 removed from the specification; it is now reserved. 4643 4644 * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. 4645 (GX_FVar_Head): Remove `countSizePairs'; the corresponding data 4646 field in the `MVAR' table is now reserved. 4647 (fvar_fields): Updated. 4648 46492017-01-23 Werner Lemberg <wl@gnu.org> 4650 4651 [truetype] Avoid segfault for invalid variation data. 4652 4653 * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure 4654 `itemCount' is not zero. 4655 4656 Reported as 4657 4658 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 4659 46602017-01-20 Werner Lemberg <wl@gnu.org> 4661 4662 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. 4663 46642017-01-17 Werner Lemberg <wl@gnu.org> 4665 4666 * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. 4667 4668 (TT_APPLE_ID_FULL_UNICODE): New macro. 4669 4670 (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, 4671 TT_MS_LANGID_UPPER_SORBIAN_GERMANY, 4672 TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, 4673 TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, 4674 TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, 4675 TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, 4676 TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, 4677 TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, 4678 TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, 4679 TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, 4680 TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New 4681 macros. 4682 4683 (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. 4684 4685 (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, 4686 TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, 4687 TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, 4688 TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, 4689 TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, 4690 TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, 4691 TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, 4692 TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, 4693 TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, 4694 TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, 4695 TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, 4696 TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, 4697 TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, 4698 TT_MS_LANGID_UIGHUR_PRC): New aliases. 4699 4700 Remove commented out code. 4701 4702 (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, 4703 TT_NAME_ID_VARIATIONS_PREFIX): New macros. 4704 4705 (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many 4706 years), use guarded long macros by default and define short versions 4707 as aliases for the long ones. 4708 47092017-01-15 Werner Lemberg <wl@gnu.org> 4710 4711 * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters 4712 also. 4713 47142017-01-11 Werner Lemberg <wl@gnu.org> 4715 4716 * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. 4717 47182017-01-11 Werner Lemberg <wl@gnu.org> 4719 4720 [truetype] Actually use metrics variation service. 4721 4722 * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. 4723 (ft_face_get_mvar_service): New auxiliary function to look up 4724 metrics variation service. 4725 (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, 4726 FT_Set_Var_Blend_Coordinates): Call metrics variation service. 4727 4728 * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for 4729 named instances. 4730 47312017-01-11 Werner Lemberg <wl@gnu.org> 4732 4733 [truetype] Provide metrics variation service. 4734 4735 * include/freetype/internal/services/svmetric.h 4736 (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. 4737 4738 * src/truetype/ttgxvar.c: Include FT_LIST_H. 4739 (tt_size_reset_iterator): New auxiliary function for... 4740 (tt_apply_var): New function. 4741 4742 * src/truetype/ttgxvar.h: Updated. 4743 4744 * src/truetype/ttdriver.c (tt_service_metrics_variations): Add 4745 `tt_apply_mvar'. 4746 4747 * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics 4748 variation service. 4749 47502017-01-11 Werner Lemberg <wl@gnu.org> 4751 4752 [truetype] Parse `MVAR' table. 4753 4754 * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. 4755 (GX_Value, GX_MVarTable): New structures. 4756 (GX_Blend): Add it. 4757 4758 * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, 4759 GX_GASP_CASE): New macros. 4760 (ft_var_get_value_pointer): New auxiliary function to get a pointer 4761 to a value from various SFNT tables already stored in `TT_Face'. 4762 (ft_var_load_mvar): New function. 4763 (TT_Get_MM_Var): Call it. 4764 (tt_done_blend): Updated. 4765 47662017-01-11 Werner Lemberg <wl@gnu.org> 4767 4768 [truetype] More preparations for MVAR support. 4769 4770 * src/truetype/ttobjs.c (tt_size_reset): Add argument to make 4771 function only recompute ascender, descender, and height. 4772 4773 * src/truetype/ttobjs.h: Updated. 4774 4775 * src/truetype/ttdriver.c (tt_size_select, tt_size_request): 4776 Updated. 4777 47782017-01-09 Werner Lemberg <wl@gnu.org> 4779 4780 [pcf] Disable long family names by default. 4781 4782 * include/freetype/config/ftoption.h 4783 (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. 4784 47852017-01-09 Werner Lemberg <wl@gnu.org> 4786 4787 [pcf] Make long family names configurable. 4788 4789 The change from 2016-09-29 was too radical (except for people using 4790 the openSuSE GNU/Linux distribution). To ameliorate the situation, 4791 PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls 4792 the feature; if set, a new PCF property option 4793 `no-long-family-names' can be used to switch this feature off. 4794 4795 * include/freetype/config/ftoption.h, devel/ftoption.h 4796 (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. 4797 4798 * include/freetype/ftpcfdrv.h: New header file (only containing 4799 comments currently, used for building the documentation). 4800 4801 * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. 4802 4803 * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. 4804 4805 * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and 4806 FT_PCF_DRIVER_H. 4807 (pcf_property_set, pcf_property_get): New functions. 4808 (pcf_service_properties): New service. 4809 (pcf_services): Updated. 4810 (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle 4811 `no_long_family_names'. 4812 4813 * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' 4814 and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. 4815 4816 * docs/CHANGES: Updated. 4817 48182017-01-09 Werner Lemberg <wl@gnu.org> 4819 4820 [pcf] Introduce a driver structure. 4821 4822 To be filled later on with something useful. 4823 4824 * src/pcf/pcf.h (PCF_Driver): New structure. 4825 4826 * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy 4827 functions. 4828 (pcf_driver_class): Updated. 4829 48302017-01-08 Werner Lemberg <wl@gnu.org> 4831 4832 [truetype] Again some GX code shuffling. 4833 4834 We need this later on for MVAR also. 4835 4836 * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing 4837 an item store variation delta into... 4838 (ft_var_get_item_delta): ...new function. 4839 48402017-01-08 Werner Lemberg <wl@gnu.org> 4841 4842 [truetype] Adjust font variation flags for MVAR. 4843 4844 * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): 4845 Remove all flags related to MVAR; replace it with... 4846 (TT_FACE_FLAG_VAR_MVAR): ...this new macro. 4847 (TT_Face): Remove `mvar_support' field (which was still unused). 4848 48492017-01-06 Werner Lemberg <wl@gnu.org> 4850 4851 [truetype] More GX code shuffling. 4852 4853 We need this later on for MVAR also. 4854 4855 * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item 4856 variation store into... 4857 (ft_var_done_item_variation_store): ...new function. 4858 48592017-01-06 Werner Lemberg <wl@gnu.org> 4860 4861 [truetype] More generalization of GX stuff. 4862 4863 We need this later on for MVAR also. 4864 4865 * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add 4866 parameters for delta-set index mapping and item variation store. 4867 (ft_var_load_item_variation_store): Add parameter for item variation 4868 store. 4869 s/hvarData/varData/. 4870 Move allocation of `hvar_table' to... 4871 (ft_var_load_hvar): ...this function. 4872 Updated. 4873 48742017-01-06 Werner Lemberg <wl@gnu.org> 4875 4876 [truetype] Some GX structure renames for generalization. 4877 4878 We need this later on for MVAR also. 4879 4880 * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... 4881 (GX_ItemVarData): ...this. 4882 (GX_HVarRegion): Renamed to... 4883 (GX_VarRegion): ...this. 4884 (GX_HVStore): Renamed to... 4885 (GX_ItemVarStore): ...this. 4886 (GX_WidthMap): Renamed to... 4887 (GX_DeltaSetIdxMap): ...this. 4888 4889 (GX_HVarTable): Updated. 4890 4891 * src/truetype/ttgxvar.c: Updated. 4892 48932017-01-06 Werner Lemberg <wl@gnu.org> 4894 4895 [truetype] Code shuffling. 4896 4897 * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of 4898 item variation store and delta set index mapping into... 4899 (ft_var_load_item_variation_store, 4900 ft_var_load_delta_set_index_mapping): ...new functions. 4901 49022017-01-06 Werner Lemberg <wl@gnu.org> 4903 4904 [truetype] Add HVAR access without advance width map. 4905 4906 * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where 4907 `offsetToAdvanceWidthMapping' is zero. 4908 (tt_hadvance_adjust): Implement direct deltaSet access by glyph 4909 index. 4910 49112017-01-06 Werner Lemberg <wl@gnu.org> 4912 4913 [pcf] Revise driver. 4914 4915 This commit improves tracing and handling of malformed fonts. In 4916 particular, the changes to `pcf_get_properties' fix 4917 4918 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 4919 4920 * src/pcf/pcfread.c (tableNames): Use long names for better 4921 readability. 4922 (pcf_read_TOC): Allow at most 9 tables. 4923 (pcf_get_properties): Allow at most 256 properties. 4924 Limit strings array length to 256 * (65536 + 1) bytes. 4925 Better tracing. 4926 (pcf_get_metric): Trace metric data. 4927 (pcf_get_metrics): Allow at most 65536 metrics. 4928 Fix comparison of `metrics->ascent' and `metrics->descent' to avoid 4929 potential overflow. 4930 Better tracing. 4931 (pcf_get_bitmaps): Allow at most 65536 bitmaps. 4932 Better tracing. 4933 (pcf_get_encodings, pcf_get_accel): Better tracing. 4934 4935 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. 4936 These are now shown by `pcf_get_bitmaps'. 4937 49382017-01-04 Werner Lemberg <wl@gnu.org> 4939 4940 * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. 4941 49422017-01-04 Werner Lemberg <wl@gnu.org> 4943 4944 [cff] More consistency checks for pure CFFs. 4945 4946 Reported as 4947 4948 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 4949 4950 * src/cff/cffload.c (cff_font_load): Check element number and size 4951 of Name and Top DICT indices. 4952 49532017-01-04 Werner Lemberg <wl@gnu.org> 4954 4955 [cff, truetype] Minor tracing improvement. 4956 4957 * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c 4958 (tt_face_init): Indent first tracing message from SFNT driver. 4959 49602017-01-03 Werner Lemberg <wl@gnu.org> 4961 4962 [truetype] Various minor fixes. 4963 4964 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction 4965 size only if we do native hinting. 4966 (TT_Load_Glyph): Trace returned error code. 4967 4968 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace 4969 returned error code. 4970 (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is 4971 invalid. 4972 49732017-01-03 Werner Lemberg <wl@gnu.org> 4974 4975 [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. 4976 4977 These tables are optional. 4978 4979 * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. 4980 49812017-01-03 Werner Lemberg <wl@gnu.org> 4982 4983 * src/cff/cffparse.c (cff_parse_num): Simplify. 4984 49852017-01-03 Werner Lemberg <wl@gnu.org> 4986 4987 Various fixes for clang's undefined behaviour sanitizer. 4988 4989 * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. 4990 (cff_blend_doBlend): Don't left-shift negative numbers. 4991 Handle 5-byte numbers byte by byte to avoid alignment issues. 4992 4993 * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by 4994 byte to avoid alignment issues. 4995 4996 * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any 4997 subrs. 4998 4999 * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. 5000 5001 * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around 5002 definition of `ft_get_adobe_glyph_index'. 5003 5004 * src/psnames/pstables.h: Regenerated. 5005 5006 * src/psnames/psmodule.c: Include `pstables.h' twice to get both 5007 declaration and definition. 5008 5009 * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix 5010 casting. 5011 50122017-01-01 Werner Lemberg <wl@gnu.org> 5013 5014 [cff] Handle multiple `blend' operators in a row correctly. 5015 5016 Reported as 5017 5018 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 5019 5020 * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' 5021 pointers into `subFont->blend_stack' after reallocation. 5022 50232017-01-01 Werner Lemberg <wl@gnu.org> 5024 5025 [sfnt] Return correct number of named instances for TTCs. 5026 5027 Without this patch, requesting information for face index N returned 5028 the data for face index N+1 (or index 0). 5029 5030 * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' 5031 for negative `face_instance_index' values. 5032 50332016-12-31 Werner Lemberg <wl@gnu.org> 5034 5035 */*: Use hex numbers for errors in tracing messages. 5036 50372016-12-31 Werner Lemberg <wl@gnu.org> 5038 5039 [truetype] Check axis count in HVAR table. 5040 5041 Reported as 5042 5043 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 5044 5045 * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. 5046 (ft_var_load_avar): Fix tracing message. 5047 5048 5049---------------------------------------------------------------------------- 5050 5051Copyright 2016-2018 by 5052David Turner, Robert Wilhelm, and Werner Lemberg. 5053 5054This file is part of the FreeType project, and may only be used, modified, 5055and distributed under the terms of the FreeType project license, 5056LICENSE.TXT. By continuing to use, modify, or distribute this file you 5057indicate that you have read the license and understand and accept it 5058fully. 5059 5060 5061Local Variables: 5062version-control: never 5063coding: utf-8 5064End: 5065