12016-12-30 Werner Lemberg <wl@gnu.org> 2 3 * Version 2.7.1 released. 4 ========================= 5 6 7 Tag sources with `VER-2-7-1'. 8 9 * docs/VERSION.TXT: Add entry for version 2.7.1. 10 11 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, 12 builds/windows/vc2005/index.html, 13 builds/windows/vc2008/freetype.vcproj, 14 builds/windows/vc2008/index.html, 15 builds/windows/vc2010/freetype.vcxproj, 16 builds/windows/vc2010/index.html, 17 builds/windows/visualc/freetype.dsp, 18 builds/windows/visualc/freetype.vcproj, 19 builds/windows/visualc/index.html, 20 builds/windows/visualce/freetype.dsp, 21 builds/windows/visualce/freetype.vcproj, 22 builds/windows/visualce/index.html, 23 builds/wince/vc2005-ce/freetype.vcproj, 24 builds/wince/vc2005-ce/index.html, 25 builds/wince/vc2008-ce/freetype.vcproj, 26 builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/. 27 28 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. 29 30 * builds/unix/configure.raw (version_info): Set to 19:0:13. 31 * CMakeLists.txt (VERSION_PATCH): Set to 1. 32 332016-12-30 Werner Lemberg <wl@gnu.org> 34 35 [ftfuzzer] Replace `rand' with an xorshift algorithm. 36 37 * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'. 38 (Random): Implement and use a 32bit `xorshift' algorithm. 39 402016-12-30 Werner Lemberg <wl@gnu.org> 41 42 [ftfuzzer] Restrict number of tested bitmap strikes. 43 44 Malformed fonts often have large values for the number of bitmap 45 strikes, and FreeType doesn't check the validity of all bitmap 46 strikes in advance. 47 48 Reported as 49 50 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353 51 52 * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. 53 (Random): Small class to provide n randomly selected numbers 54 (without repetition) out of the value set [1,N]. 55 (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap 56 strikes. 57 582016-12-29 Werner Lemberg <wl@gnu.org> 59 60 [truetype] Variation font API stability issues. 61 62 Make some functions work before a call to `TT_Set_MM_Blend'. 63 64 * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if 65 we don't blend. 66 (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we 67 don't blend. 68 692016-12-29 Werner Lemberg <wl@gnu.org> 70 71 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data. 72 73 Reported as 74 75 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348 76 772016-12-29 Werner Lemberg <wl@gnu.org> 78 79 [truetype] Tracing fixes. 80 81 * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct 82 information. 83 (TT_Set_Var_Design): Fix typo. 84 (TT_Get_Var_Design): Fix typos. 85 862016-12-29 Werner Lemberg <wl@gnu.org> 87 88 */*: Use `0.5f' for tracing 16.16 numbers. 89 902016-12-29 Werner Lemberg <wl@gnu.org> 91 92 [pcf] Protect against gzip bombs. 93 94 Fix suggested by Kostya; reported as 95 96 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345 97 98 * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to 99 1024. 100 1012016-12-28 Werner Lemberg <wl@gnu.org> 102 103 [psnames] Only declare, not define, data in `pstables.h' (#49949). 104 105 Pdfium includes `pstables.h' a second time; moving the definition 106 from `pstables.h' to `psmodule.c' saves more than 60kByte data 107 segment space for this case. 108 109 * src/tools/glnames.py (StringTable::dump, 110 StringTable::dump_sublist, dump_encoding, dump_array): Emit 111 additional code to only define tables if `DEFINE_PS_TABLES' is set. 112 113 * src/psnames/pstables.h: Regenerated. 114 * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define. 115 1162016-12-28 Werner Lemberg <wl@gnu.org> 117 118 [cff] Catch `blend' op in non-variant fonts. 119 120 Reported as 121 122 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 123 124 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't 125 allow `blend' op for non-variant fonts. 126 1272016-12-28 Werner Lemberg <wl@gnu.org> 128 129 [cff] Better check of number of blends. 130 131 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>, 132 src/cff/cffparse.c (cff_parse_blend): Compare number of blends with 133 stack size. 134 1352016-12-27 Werner Lemberg <wl@gnu.org> 136 137 Documentation updates. 138 139 * docs/CHANGES: Add missing information. 140 141 * docs/formats.txt: Rewritten and updated. 142 1432016-12-27 Werner Lemberg <wl@gnu.org> 144 145 [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'. 146 147 * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement. 148 (TT_Set_Var_Design): Fix tracing. 149 150 * src/type1/t1load.c (T1_Get_Var_Design): Implement. 151 1522016-12-24 Werner Lemberg <wl@gnu.org> 153 154 * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'. 155 156 Problem reported by 張俊芝 <418092625@qq.com>. 157 1582016-12-24 Werner Lemberg <wl@gnu.org> 159 160 * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values. 161 162 Some fonts seem to have the `version' field in the wrong byte order. 163 164 Problem reported by 張俊芝 <418092625@qq.com>. 165 1662016-12-24 Werner Lemberg <wl@gnu.org> 167 168 * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length. 169 170 This trivial fix allows us to accept more fonts. 171 172 Problem reported by 張俊芝 <418092625@qq.com>. 173 1742016-12-24 Werner Lemberg <wl@gnu.org> 175 176 * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing. 177 1782016-12-22 Werner Lemberg <wl@gnu.org> 179 180 * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909). 181 1822016-12-22 Werner Lemberg <wl@gnu.org> 183 184 Ensure used preprocessor symbols are defined (#49790). 185 186 * builds/unix/ftconfig.in, builds/vms/ftconfig.h, 187 include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__', 188 and `__SUNPRO_C' correctly. 189 1902016-12-22 Werner Lemberg <wl@gnu.org> 191 192 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'. 193 194 Reported as 195 196 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308 197 1982016-12-22 Werner Lemberg <wl@gnu.org> 199 200 [cff] Protect against invalid `vsindex' and `blend' values. 201 202 Reported as 203 204 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 205 206 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX, 207 cf2_cmdBLEND>: Implement it. 208 2092016-12-22 Werner Lemberg <wl@gnu.org> 210 211 [ftfuzzer] Always use Adobe CFF engine. 212 213 * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement 214 it. 215 2162016-12-21 Werner Lemberg <wl@gnu.org> 217 218 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. 219 220 I should really stop coding late in the evening... 221 222 Thanks again to Ben for checking. 223 2242016-12-21 Werner Lemberg <wl@gnu.org> 225 226 [autofit] Support variation fonts. 227 228 (This ChangeLog entry was added later on.) 229 230 * src/autofit/afglobal.c (af_face_globals_free): Remove useless 231 code. 232 233 * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, 234 * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, 235 FT_Set_Var_Blend_Coordinates): Finalize 236 auto-hinter data to enforce recomputation. Note that this is a 237 brute-force method which should be improved. 238 2392016-12-21 Werner Lemberg <wl@gnu.org> 240 241 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. 242 243 Don't apply deltas twice for non-phantom points. 244 245 Spotted by Ben Wagner. 246 2472016-12-21 Werner Lemberg <wl@gnu.org> 248 249 [cff, truetype] Another try for #49829. 250 251 * src/cff/cffdrivr.c: Don't include 252 `FT_SERVICE_METRICS_VARIATIONS_H'. 253 (cff_get_advances): Use `ttface->variation_support'. 254 255 * src/truetype/ttdriver.c (tt_get_advances): Use 256 `ttface->variation_support'. 257 258 * src/truetype/ttgload.c (TT_Process_Simple_Glyph, 259 load_truetype_glyph): Use `ttface->variation_support'. 260 2612016-12-21 Werner Lemberg <wl@gnu.org> 262 263 [truetype, sfnt] Introduce font variation flags to `TT_Face'. 264 265 * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): 266 New macros describing available functionality of various OpenType 267 tables related to font variation. 268 (TT_Face): New fields `variation_support' and `mvar_support', 269 replacing and extending `use_fvar'. 270 271 * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use 272 `variation_support'. 273 274 * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support' 275 field. 276 (TT_Vary_Apply_Glyph_Deltas): Updated. 277 2782016-12-21 Werner Lemberg <wl@gnu.org> 279 280 [base] Improve sanity check for Mac resources (#49888). 281 282 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not 283 positive. 284 2852016-12-20 Werner Lemberg <wl@gnu.org> 286 287 [base] More sanity checks for Mac resources. 288 289 We use 290 291 https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format 292 293 and 294 295 https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 296 297 as references. 298 299 * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short 300 for `res_id'. 301 302 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length 303 and use it to improve sanity checks. 304 Follow the specification more closely;in particular, all data types 305 are signed, not unsigned. 306 (FT_Raccess_Get_DataOffsets): Follow the specification more closely; 307 in particular, all data types are signed, not unsigned. 308 Add some sanity checks. 309 3102016-12-20 Werner Lemberg <wl@gnu.org> 311 312 [truetype] Improve logic for getting fast advance widths. 313 314 * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c 315 (tt_get_advances): Use `is_default_instance' for test; this gets 316 recomputed after changing blend coordinates. 317 3182016-12-20 Ben Wagner <bungeman@google.com> 319 Werner Lemberg <wl@gnu.org> 320 321 [truetype] Fix linear metrics of GX variation fonts (#49829). 322 323 When asking for an unhinted non-default variations, 324 `linearVertAdvance' is currently the value from the `hmtx' table 325 instead of the actual value after applying the variation. `HVAR' 326 support fixes this, but fonts will exist without that table and will 327 need sane fallback. 328 329 Problem also reported as 330 331 https://bugs.chromium.org/p/skia/issues/detail?id=5917 332 333 * src/truetype/ttgload.c (TT_Process_Simple_Glyph, 334 load_truetype_glyph): Implement linear advance adjustments if `HVAR' 335 or `VVAR' tables are missing. 336 3372016-12-20 Werner Lemberg <wl@gnu.org> 338 339 [cff, truetype] Fast advance width retrieval for fonts with HVAR. 340 341 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 342 343 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. 344 345 * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. 346 (cff_get_advances): Test for HVAR and VVAR. 347 348 * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR. 349 3502016-12-18 Werner Lemberg <wl@gnu.org> 351 352 [base] Fix invalid mac font recursion. 353 354 Reported as 355 356 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304 357 358 * src/base/ftobjs.c (FT_Open_Face): Code moved to... 359 (ft_open_face_internal): ... this function. 360 Add a parameter to control whether we try special Mac font handling 361 in case of failure. 362 (FT_Open_Face, FT_New_Face, FT_New_Memory_Face, 363 open_face_from_buffer): Use `ft_open_face_internal'. 364 3652016-12-18 Werner Lemberg <wl@gnu.org> 366 367 * src/cff/cffobjs.c (cff_face_init): Make named instances work. 368 3692016-12-18 Werner Lemberg <wl@gnu.org> 370 371 [truetype, cff] Extend `get_var_blend' function of MM service. 372 373 In particular, we need access to named instance data. 374 375 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): 376 Add argument for `FT_MM_Var'. 377 378 * src/cff/cffload.c (cff_get_var_blend): Updated. 379 * src/cff/cffload.h: Updated. 380 381 * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. 382 383 * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. 384 Accept value `NULL' for arguments. 385 * src/truetype/ttgxvar.h: Updated. 386 3872016-12-18 Werner Lemberg <wl@gnu.org> 388 389 [sfnt] Handle `fvar' with zero axes as a non-MM font. 390 391 This is better behaviour than exiting with an error. 392 393 * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar' 394 field. 395 396 * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also 397 updating the validation code. 398 Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS. 399 400 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation 401 code. 402 4032016-12-18 Werner Lemberg <wl@gnu.org> 404 405 Minor GX code shuffling. 406 407 * include/freetype/internal/tttypes.h (TT_Face): Move 408 `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT 409 block. 410 411 * src/sfnt/sfobjs.c (sfnt_init_face): Updated. 412 * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro. 413 (TT_Load_Glyph): Use it. 414 4152016-12-18 Werner Lemberg <wl@gnu.org> 416 417 [cff] Better handling of non-CFF font formats. 418 419 * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a 420 signature, so return `FT_Err_Unknown_File_Format' more often. 421 4222016-12-17 Werner Lemberg <wl@gnu.org> 423 424 * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code. 425 4262016-12-17 Werner Lemberg <wl@gnu.org> 427 428 * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code. 429 4302016-12-17 Werner Lemberg <wl@gnu.org> 431 432 [sfnt, truetype] Various sanitizing fixes. 433 434 * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is 435 zero, set `num_instances' to zero. 436 437 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with 438 zero axes as invalid. 439 440 * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading 441 `loca', `cvt', `fpgm', and `prep' table. 442 4432016-12-17 Werner Lemberg <wl@gnu.org> 444 445 Improve tracing of `FT_Open_Face'. 446 447 * src/base/ftobjs.c (FT_Open_Face): Return info on number of 448 available faces and numbered instances, or the indices of the 449 requested face and numbered instance. 450 451 * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts. 452 4532016-12-17 Werner Lemberg <wl@gnu.org> 454 455 * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. 456 457 Reported as 458 459 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295 460 4612016-12-16 Werner Lemberg <wl@gnu.org> 462 463 [truetype] Fix `cvar' sanity test. 464 465 Reported by Dave Arnold. 466 467 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask. 468 4692016-12-16 Werner Lemberg <wl@gnu.org> 470 471 [cff, truetype] Remove compiler warnings; fix `make multi'. 472 473 * src/cff/cf2font.h: Include `cffload.h'. 474 475 * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and 476 FT_SERVICE_MULTIPLE_MASTERS_H. 477 (cff_vstore_load): Eliminate `vsSize'. 478 (cff_load_private_dict): Tag as `FT_LOCAL_DEF'. 479 480 * src/cff/cffload.h: Include `cffobjs.h'. 481 Provide declaration for `cff_load_private_dict'. 482 483 * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate 484 `minorVersion' and `map_offset'. 485 4862016-12-16 Werner Lemberg <wl@gnu.org> 487 488 [cff] Fix heap buffer overflow (#49858). 489 490 * src/cff/cffparse.c (cff_parser_run): Add one more stack size 491 check. 492 4932016-12-15 Werner Lemberg <wl@gnu.org> 494 495 Fix clang warnings. 496 497 * src/cff/cffload.c (cff_blend_doBlend): Add cast. 498 (cff_subfont_load): Set `error' correctly. 499 500 * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo. 501 5022016-12-15 Dave Arnold <darnold@adobe.com> 503 Werner Lemberg <wl@gnu.org> 504 505 [cff] Implement CFF2 support (2/2). 506 507 The font variation code. All parts dependent on the GX code in the 508 `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 509 In other words, you can still compile the `cff' module without 510 defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2 511 support without font variation). 512 513 * src/cff/cf2font.c (cf2_font_setup): Add support for font 514 variation. 515 * src/cff/cf2font.h (CF2_Font): Add fields for variation data. 516 517 * src/cff/cf2ft.c (cf2_free_instance): Free blend data. 518 (cf2_getVStore, cf2_getNormalizedVector): New functions. 519 * src/cff/cf2ft.h: Updated. 520 521 * src/cff/cf2intrp.c: Include `cffload.h'. 522 (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with... 523 (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values. 524 (cf2_doBlend): New function. 525 (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes. 526 527 * src/cff/cffload.c (FT_fdot14ToFixed): New macro. 528 (cff_vstore_done, cff_vstore_load): New functions. 529 (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector, 530 cff_blend_check_vector): New functions. 531 (cff_load_private_dict): Add arguments for blend vector. 532 Handle blend data. 533 (cff_subfont_load, cff_subfont_done): Updated. 534 (cff_font_load): Handle CFF2 variation store data. 535 (cff_font_done): Updated. 536 * src/cff/cffload.h: Include `cffparse.h'. 537 Updated. 538 539 * src/cff/cffobjs.c (cff_face_done): Updated. 540 541 * src/cff/cffparse.c: Include `cffload.h'. 542 (cff_parse_num): Handle internal value 255. 543 (cff_parse_vsindex, cff_parse_blend): New functions. 544 (CFF_FIELD_BLEND): New macro. 545 (cff_parser_run): Updated. 546 * src/cff/cffparse.h (cff_kind_blend): New enum value. 547 548 * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend' 549 dictionary values. 550 551 * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion, 552 CFF_VStore, CFF_Blend): New structures. 553 (CFF_FontRecDict): Add `vstore_offset' field. 554 (CFF_Private): Add `vsindex' field. 555 (CFF_SubFont): Add fields for blend data. 556 (CFF_Font): Add `vstore' field. 557 558 * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar', 559 since glyph variation data is directly embedded. 560 (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts. 561 5622016-12-15 Dave Arnold <darnold@adobe.com> 563 Werner Lemberg <wl@gnu.org> 564 565 [cff] Implement CFF2 support (1/2). 566 567 This commit does not contain the blend code for font variation 568 support, which follows in another commit. 569 570 You should ignore whitespace while inspecting this commit. 571 572 * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2' 573 member. 574 575 * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member. 576 577 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2' 578 flag. 579 (cf2_getMaxstack): New function. 580 * src/cff/cf2ft.h: Updated. 581 582 * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum. 583 (cf2_interpT2CharString): Handle CFF2 differences. 584 Add tracing message for errors. 585 586 * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index): 587 Update for CFF2. 588 589 * src/cff/cffload.c (FT_FIXED_ONE): New macro. 590 (cff_index_init, cff_index_load_offsets, cff_index_access_element, 591 cff_index_get_name, cff_ft_select_get, cff_load_private_dict, 592 cff_subfont_load, cff_font_load): Handle CFF2. 593 * src/cff/cffload.h: Updated. 594 595 * src/cff/cffobjs.c (cff_face_init): Handle CFF2. 596 597 * src/cff/cffparse.c (cff_parse_maxstack): New function. 598 (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed 599 * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New 600 macros. 601 (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New 602 macros. 603 604 * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend 605 stuff). 606 607 * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field. 608 (CFF_FontRecDict): Add `maxstack' field. 609 (CFF_Private): Add `subfont' field. 610 (CFF_Font): Add `top_dict_length' and `cff2' fields. 611 612 * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table. 613 6142016-12-15 Werner Lemberg <wl@gnu.org> 615 Dave Arnold <darnold@adobe.com> 616 617 [truetype] Provide HVAR advance width variation as a service. 618 619 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 620 621 * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. 622 623 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent 624 double adjustment of advance width. 625 626 * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H. 627 (tt_face_get_metrics): Apply metrics variations. 628 6292016-12-15 Dave Arnold <darnold@adobe.com> 630 Werner Lemberg <wl@gnu.org> 631 632 [truetype] Provide function to apply `HVAR' advance width variation. 633 634 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 635 636 * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function. 637 * src/truetype/ttgxvar.h: Updated. 638 6392016-12-15 Dave Arnold <darnold@adobe.com> 640 Werner Lemberg <wl@gnu.org> 641 642 [truetype] Add `HVAR' table parsing. 643 644 Note that this is not complete yet; it only handles advance width 645 variation. 646 647 Activation of the code follows in another commit. 648 649 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 650 651 * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member. 652 653 * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion, 654 GX_HVStore, GX_WidthMap): New auxiliary structures for... 655 (GX_HVarTable): ... HVAR main structure. 656 (GX_BlendRec): Add data for HVAR loading. 657 658 * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed, 659 FT_intToFixed, FT_fixedToInt): New macros. 660 (ft_var_load_hvar): New function. 661 (TT_Get_MM_Var): Updated. 662 (tt_done_blend): Deallocate HVAR data. 663 6642016-12-15 Dave Arnold <darnold@adobe.com> 665 666 [cff] Extend number parsing. 667 668 The forthcoming CFF2 support needs a dynamic parsing limit. 669 670 * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed, 671 cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for 672 parser. 673 (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict, 674 cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated. 675 676 * src/cff/cffparse.h (cff_parse_num): Export locally. 677 6782016-12-15 Dave Arnold <darnold@adobe.com> 679 680 [cff] Implement dynamic stack size for Adobe engine. 681 682 This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for 683 the forthcoming CFF2 support. 684 685 * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size. 686 (cf2_stack_free): Deallocate stack. 687 (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed, 688 cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal, 689 cf2_stack_clear): Updated. 690 (cf2_stack_setReal, cf2_stack_pop): New functions. 691 692 * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member. 693 Update function declarations. 694 695 * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated. 696 697 * src/cff/cffparse.c (cff_parser_init): Add parameter for stack 698 size; return error code. 699 (cff_parser_done): New function. 700 (cff_parser_run): Updated. 701 702 * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make 703 `stack' a pointer. 704 Update function declarations. 705 706 * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load): 707 Updated. 708 7092016-12-15 Dave Arnold <darnold@adobe.com> 710 Werner Lemberg <wl@gnu.org> 711 712 [cff] Code shuffling. 713 714 * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' 715 fields. 716 717 * src/cff/cffload.c (cff_subfont_load): Change last argument to 718 `CFF_Font' 719 Split off parsing of private dictionary into... 720 (cff_load_private_dict): ...this new function. 721 (cff_font_load): Updated. 722 7232016-12-14 Werner Lemberg <wl@gnu.org> 724 725 [sfnt, truetype] Add framework for Metrics Variations service. 726 727 No effect yet; service functions will be implemented later on. 728 729 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 730 731 * include/freetype/internal/services/svmetric.h: New file. 732 733 * include/freetype/internal/ftserv.h 734 (FT_SERVICE_METRICS_VARIATIONS_H): New macro. 735 736 * include/freetype/internal/tttypes.h (TT_Face): New field `var'. 737 738 * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H. 739 (sfnt_init_face): Initialize `face->var'. 740 741 * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H. 742 (tt_service_metrics_variations): New service. 743 (tt_services): Updated. 744 745 * src/truetype/ttpic.h: Updated. 746 7472016-12-14 Werner Lemberg <wl@gnu.org> 748 749 [cff] Add Multiple Masters service. 750 751 The code simply uses the MM functions from the `truetype' module. 752 753 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 754 755 * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. 756 757 * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. 758 (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var, 759 cff_set_var_design, cff_get_var_design): New functions. 760 (cff_service_multi_masters): New service. 761 (cff_services): Updated. 762 763 * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New 764 functions. 765 * src/cff/cffload.h: Updated. 766 767 * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. 768 769 * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. 770 (sfnt_init_face): Initialize `face->mm'. 771 7722016-12-14 Werner Lemberg <wl@gnu.org> 773 774 Extend functionality of `ft_module_get_service'. 775 776 It can now differentiate between local and global searches. 777 778 * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. 779 (FT_Get_TrueType_Engine_Type): Updated. 780 781 * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. 782 783 * include/freetype/internal/ftobjs.h: Updated. 784 * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): 785 Updated. 786 7872016-12-14 Werner Lemberg <wl@gnu.org> 788 789 * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning. 790 7912016-12-14 Dave Arnold <darnold@adobe.com> 792 Werner Lemberg <wl@gnu.org> 793 794 [sfnt, cff] Minor preparations. 795 796 * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, 797 TTAG_VVAR): New SFNT table tags. 798 799 * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast. 800 8012016-12-10 Werner Lemberg <wl@gnu.org> 802 803 [truetype, type1] Add `get_var_blend' to MM service. 804 805 For internal use; we want to share code between the forthcoming CFF2 806 support and TrueType. 807 808 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): 809 New typedef. 810 (MultiMasters): Add `get_var_blend'. 811 (FT_Service_MultiMasters): Updated. 812 813 * src/truetype/ttgxvar.c (tt_get_var_blend): New function. 814 * src/truetype/ttgxvar.h: Updated. 815 816 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. 817 * src/type1/t1driver.c (t1_service_multi_masters): Updated. 818 8192016-12-10 Werner Lemberg <wl@gnu.org> 820 821 [truetype, type1] Add `done_blend' to MM service. 822 823 For internal use; we want to share code between the forthcoming CFF2 824 support and TrueType. 825 826 * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): 827 New typedef. 828 (MultiMasters): Add `done_blend'. 829 (FT_Service_MultiMasters): Updated. 830 831 * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. 832 * src/truetype/ttgxvar.h: Updated. 833 834 * src/truetype/ttobjs.c (TT_Face_Done): Updated. 835 836 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. 837 * src/type1/t1driver.c (t1_service_multi_masters): Updated. 838 8392016-12-09 Werner Lemberg <wl@gnu.org> 840 841 [sfnt] Revert change from 2016-12-08. 842 843 I missed the functionality of `ft_module_get_service', which makes 844 the change unnecessary. 845 8462016-12-08 Werner Lemberg <wl@gnu.org> 847 848 Add framework to support services with 8 functions. 849 850 We will need this for CFF variation font support. 851 852 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8): 853 New macro. 854 8552016-12-08 Werner Lemberg <wl@gnu.org> 856 857 [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface. 858 859 CFF2 fonts will need access to those two functions. 860 861 * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H. 862 (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members. 863 (FT_DEFINE_SFNT_INTERFACE): Updated. 864 865 * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index): 866 Fix signatures to exactly correspond to the glyph dict service 867 function typedefs. 868 (sfnt_interface): Updated. 869 8702016-12-06 Dave Arnold <darnold@adobe.com> 871 872 Add `FT_Get_Var_Design_Coordinates' function. 873 874 Note that the low-level functions aren't implemented yet. 875 876 * include/freetype/ftmm.h: Declare. 877 878 * include/freetype/internal/services/svmm.h 879 (FT_Get_Var_Design_Func): New typedef. 880 (MultiMasters): New MM service function `get_var_design'. 881 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. 882 Update all callers. 883 884 * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. 885 886 * src/truetype/ttdriver.c: Updated. 887 888 * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to 889 handle `get_var_design' service. 890 * src/truetype/ttgxvar.h: Updated. 891 892 * src/type1/t1driver.c: Updated. 893 894 * src/type1/t1load.c (T1_Get_Var_Design): New dump function to 895 handle `get_var_design' service. 896 * src/type1/t1load.h: Updated. 897 8982016-12-06 Werner Lemberg <wl@gnu.org> 899 900 * src/type1/t1load.c (parse_subrs): Fix memory leak. 901 902 The `subrs' keyword might erroneously occur multiple times. 903 904 Reported as 905 906 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231 907 9082016-12-01 Werner Lemberg <wl@gnu.org> 909 910 [gzip] Improve building with external zlib (#49673). 911 912 Building FreeType with external zlib 1.2.8 makes msvc 14 stop with 913 the following error. 914 915 ftgzip.c 916 zlib-1.2.8\zlib.h(86): error C2061: 917 syntax error: identifier 'z_const' 918 zlib-1.2.8\zlib.h(94): error C2054: 919 expected '(' to follow 'z_const' 920 zlib-1.2.8\zlib.h(94): error C2085: 921 'msg': not in formal parameter list 922 ... 923 zlib-1.2.8\zlib.h(877): fatal error C1003: 924 error count exceeds 100; stopping compilation 925 926 The error happens because FreeType keeps an own copy of zlib-1.1.4 927 under `src/gzip'. When building `src/gzip/ftgzip.c' with 928 FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses 929 930 #include <zlib.h> 931 932 which correctly finds an external `zlib.h', but `zlib.h' itself has 933 a line 934 935 #include "zconf.h" 936 937 which makes Visual Studio 2015 find `src/gzip/zconf.h' while 938 compiling the files in `src/gzip'. 939 940 * src/gzip/zconf.h: Rename to... 941 * src/gzip/ftzconf.h: ... this. 942 * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. 943 9442016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com> 945 946 [autofit] Fix Emscripten crash (patch #9180). 947 948 Function calls through pointers must use a matching signature to 949 work on Emscripten, since such calls are dispatched through lookup 950 tables grouped by signature. 951 952 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix 953 typedef. 954 9552016-11-29 Werner Lemberg <wl@gnu.org> 956 957 [smooth] Revert previous commit. Already fixed with 6ca54c64. 958 9592016-11-29 Werner Lemberg <wl@gnu.org> 960 961 [smooth] Avoid conditional jump on uninitialized value (#49711). 962 963 * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'. 964 9652016-11-27 Nikolaus Waxweiler <madigens@gmail.com> 966 967 [autofit] Code shuffling. 968 969 Also improve some comments and remove unused code. 970 971 No functional change. 972 973 * src/autofit/afloader.c (af_loader_load_g): Merged with... 974 (af_loader_load_glyph): ...this function. 975 Split off emboldening code into... 976 (af_loader_embolden_glyph_in_slot): ... this function. 977 9782016-11-17 Werner Lemberg <wl@gnu.org> 979 980 Better support of LLP64 systems with gcc (and clang). 981 982 * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'. 983 984 * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and 985 suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'. 986 9872016-11-10 Werner Lemberg <wl@gnu.org> 988 989 Fix `lcd_weights' array size. 990 991 * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it. 992 993 Reported by Nikolaus. 994 9952016-11-06 Werner Lemberg <wl@gnu.org> 996 997 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing. 998 9992016-11-06 Werner Lemberg <wl@gnu.org> 1000 1001 [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format. 1002 1003 It's unavoidable to call the PNG engine, but to get the metrics it 1004 is sufficient to read the PNG image's header only. 1005 1006 * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the 1007 allocation of the glyph slot. 1008 * src/sfnt/pngshim.h: Updated. 1009 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png, 1010 tt_face_load_sbix_image, tt_face_load_sbit_image): Updated. 1011 10122016-11-06 Werner Lemberg <wl@gnu.org> 1013 1014 [sfnt] Speed up `sbix' lookup. 1015 1016 This also fixes a bug introduced in 2016-10-01 which prevents 1017 display of embedded bitmap fonts that use the `sbix' format. 1018 1019 * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and 1020 offset also in `ebdt_size' and `ebdt_start', respectively. This 1021 makes the test for an embedded bitmap data table succeed for this 1022 format. 1023 1024 (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use 1025 `ebdt_size' and `ebdt_start' 1026 (tt_face_load_sbix_image): Ditto. 1027 10282016-11-06 Seigo Nonaka <nona@google.com> 1029 Werner Lemberg <wl@gnu.org> 1030 1031 Introduce a way of quickly retrieving (embedded) bitmap metrics. 1032 1033 `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph 1034 until the user calls `FT_Render_Glyph'. However, it always 1035 allocates memory for bitmaps and copies or decodes the contents of a 1036 bitmap glyph, which can be quite slow for PNG data. 1037 1038 * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New 1039 macro. 1040 1041 * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if 1042 FT_LOAD_BITMAP_METRICS_ONLY is used. 1043 1044 * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap, 1045 tt_sbit_decoder_load_bitmap): Add argument to control allocation of 1046 the glyph slot. 1047 (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound, 1048 tt_face_load_sbit_image): Updated. 1049 1050 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if 1051 `FT_LOAD_BITMAP_METRICS_ONLY' is set. 1052 1053 * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add 1054 argument to control allocation of the glyph slot. 1055 * src/pfr/pfrobjs (pfr_slot_load): Updated. 1056 1057 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. 1058 1059 * docs/CHANGES: Updated. 1060 10612016-11-06 Werner Lemberg <wl@gnu.org> 1062 1063 Synchronize with gnulib (#49448). 1064 1065 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, 1066 builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in 1067 current version of `intprops.h'. 1068 Other minor synchronization to reduce code differences between the 1069 three files. 1070 10712016-11-03 Behdad Esfahbod <behdad@behdad.org> 1072 1073 [truetype] Clamp variation requests to valid range. 1074 1075 This is required by OpenType 1.8; it also avoids rounding surprises. 1076 1077 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates 1078 outside of the allowed range to always stay within the range instead 1079 of producing an error. 1080 10812016-10-29 Werner Lemberg <wl@gnu.org> 1082 1083 [truetype] Remove clang warnings. 1084 1085 * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for 1086 loop counter handling. 1087 1088 * src/truetype/ttinterp.c: Updated. 1089 (Ins_SCANTYPE): Use signed constant. 1090 (TT_RunIns): Ensure `num_twilight_points' is 16bit. 1091 10922016-10-27 Werner Lemberg <wl@gnu.org> 1093 1094 [truetype] Fix commit from 2014-11-24. 1095 1096 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. 1097 1098 * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking 1099 logic. 1100 11012016-10-26 Werner Lemberg <wl@gnu.org> 1102 1103 Add `FT_Get_{MM,Var}_Blend_Coordinates' functions. 1104 1105 * include/freetype/ftmm.h: Declare. 1106 1107 * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): 1108 New typedef. 1109 (MultiMasters): New MM service function `get_mm_blend'. 1110 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. 1111 Update all callers. 1112 1113 * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, 1114 FT_Get_Var_Blend_Coordinates): Implement. 1115 1116 * src/truetype/ttdriver.c: Updated. 1117 1118 * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle 1119 `get_mm_blend' service. 1120 * src/truetype/ttgxvar.h: Updated. 1121 1122 * src/type1/t1driver.c: Updated. 1123 1124 * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle 1125 `get_mm_blend' service. 1126 * src/type1/t1load.h: Updated. 1127 1128 * docs/CHANGES: Document. 1129 11302016-10-26 Werner Lemberg <wl@gnu.org> 1131 1132 * src/type1/t1load.c (parse_subrs): Fix limit check. 1133 1134 Reported as 1135 1136 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81 1137 11382016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com> 1139 1140 [cff] Correct cmap format reporting (#24819). 1141 1142 * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic 1143 charmap instead of guessing its format and language. 1144 11452016-10-22 Werner Lemberg <wl@gnu.org> 1146 1147 [truetype] Fix SCANTYPE instruction (#49394). 1148 1149 * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits. 1150 11512016-10-22 Werner Lemberg <wl@gnu.org> 1152 1153 [sfnt] Improve handling of invalid post 2.5 tables [#49393]. 1154 1155 * src/sfnt/ttpost.c (load_format_25): We need at least a single 1156 table entry. 1157 11582016-10-14 Werner Lemberg <wl@gnu.org> 1159 1160 [truetype] Fix handling of `cvar' table data. 1161 1162 Reported as 1163 1164 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53 1165 1166 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT 1167 indices. 1168 11692016-10-11 Werner Lemberg <wl@gnu.org> 1170 1171 [psaux] Fix handling of invalid flex subrs. 1172 1173 Problem reported as 1174 1175 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52 1176 1177 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) 1178 <op_callothersubr>: Set `flex_state' after error checking. 1179 11802016-10-11 Werner Lemberg <wl@gnu.org> 1181 1182 * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation. 1183 11842016-10-08 Werner Lemberg <wl@gnu.org> 1185 1186 * src/cid/cidload.c (cid_face_open): Properly propagate `error'. 1187 11882016-10-08 Werner Lemberg <wl@gnu.org> 1189 1190 [cid] Fix parsing of subr offsets. 1191 1192 Bug introduced 2016-05-16. 1193 1194 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error. 1195 11962016-10-01 Werner Lemberg <wl@gnu.org> 1197 1198 [sfnt] Disable bitmap strikes if we don't have a bitmap data table. 1199 1200 * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have 1201 a bitmap data table. 1202 12032016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> 1204 1205 [smooth] Remove impossibility. 1206 1207 * src/smooth/ftgrays.c (TWorker): Rearrange fields. 1208 (gray_convert_glyph): Remove impossible condition and clean up. 1209 12102016-09-29 Werner Lemberg <wl@gnu.org> 1211 1212 [pcf] Enrich family name with foundry name and glyph width info. 1213 1214 This is a very old patch from openSuSE (from 2006, submitted to 1215 FreeType in 2011) that I forgot to apply. 1216 1217 https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch 1218 1219 Prepend the foundry name plus a space to the family name. There are 1220 many fonts just called `Fixed' which look completely different, and 1221 which have nothing to do with each other. When selecting `Fixed' in 1222 KDE or Gnome one gets results that appear rather random, the style 1223 changes often if one changes the size and one cannot select some 1224 fonts at all. 1225 1226 We also check whether we have `wide' characters; all put together, 1227 we get family names like `Sony Fixed' or `Misc Fixed Wide'. 1228 1229 * src/pcf/pcfread.c (pcf_load_font): Implement it. 1230 1231 * docs/CHANGES: Document it. 1232 12332016-09-29 Werner Lemberg <wl@gnu.org> 1234 1235 [ftfuzzer] Speed up. 1236 1237 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't 1238 check for embedded bitmaps if we have a non-default instance. 1239 12402016-09-29 Werner Lemberg <wl@gnu.org> 1241 1242 [truetype] Disallow bitmap strikes for non-default instances. 1243 1244 Also speed up access of default instances if GX variations are 1245 active. 1246 1247 * include/freetype/internal/tttypes.h (TT_FaceRec): Add 1248 `is_default_instance' member. 1249 1250 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize 1251 `is_default_instance'. 1252 1253 * src/truetype/ttgload.c (TT_Process_Simple_Glyph, 1254 load_truetype_glyph): Add test for default instance. 1255 (TT_Load_Glyph): Load embedded bitmaps for default instance only. 1256 1257 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute 1258 `is_default_instance'. 1259 12602016-09-29 Werner Lemberg <wl@gnu.org> 1261 1262 [truetype] Clean up `TT_Face' structure. 1263 1264 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused 1265 fields `horz_metrics' and `vert_metrics'. 1266 Update documentation. 1267 1268 * src/sfnt/sfobjs.c (sfnt_done_face): Updated. 1269 12702016-09-28 Werner Lemberg <wl@gnu.org> 1271 1272 More FT_ZERO usage. 1273 1274 * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): 1275 s/ft_memset/FT_MEM_ZERO/. 1276 1277 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): 1278 s/ft_memset/FT_ARRAY_ZERO/. 1279 1280 * src/raster/ftraster.c (FT_ZERO): Define. 1281 (ft_black_new): Use it. 1282 * src/raster/ftrend1.c (ft_raster1_get_cbox): 1283 s/FT_MEM_ZERO/FT_ZERO/. 1284 1285 * src/smooth/ftgrays.c (FT_ZERO): Define. 1286 (gray_raster_new): Use it. 1287 * src/smooth/ftsmooth.c (ft_smooth_get_cbox): 1288 s/FT_MEM_ZERO/FT_ZERO/. 1289 12902016-09-28 Werner Lemberg <wl@gnu.org> 1291 1292 */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate. 1293 12942016-09-27 Werner Lemberg <wl@gnu.org> 1295 1296 [truetype] Trace number of executed opcodes. 1297 1298 * src/truetype/ttinterp.c (TT_RunIns): Implement it. 1299 13002016-09-27 Werner Lemberg <wl@gnu.org> 1301 1302 [truetype] Speed up `TT_Load_Glyph'. 1303 1304 This avoids additional calls to `tt_face_lookup_table' for the 1305 `glyf' table, which can be expensive. 1306 1307 * include/freetype/internal/tttypes.h (TT_LoaderRec): Move 1308 `glyf_offset' field to ... 1309 (TT_FaceRec): ... this structure. 1310 * src/truetype/ttgload.c (load_truetype_glyph): Updated. 1311 (tt_loader_init): Move initialization of `glyf_offset' to ... 1312 * src/truetype/ttpload.c (tt_face_load_loca): ... this function. 1313 13142016-09-27 Werner Lemberg <wl@gnu.org> 1315 1316 [truetype] Introduce dynamic limits for some bytecode opcodes. 1317 1318 This speeds up FreeType's handling of malformed fonts. 1319 1320 * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number 1321 of twilight points, the total number of negative jumps, and the 1322 total number of loops in LOOPCALL opcodes. The values are based on 1323 the number of points and entries in the CVT table. 1324 (Ins_JMPR): Test negative jump counter. 1325 (Ins_LOOPCALL): Test loopcall counter. 1326 1327 * src/truetype/ttinterp.h (TT_ExecContext): Updated. 1328 1329 * docs/CHANGES: Updated. 1330 13312016-09-25 Werner Lemberg <wl@gnu.org> 1332 1333 [truetype] Sanitize only last entry of `loca' table. 1334 1335 Without this patch, a loca sequence like `0 100000 0 100000 ...', 1336 where value 100000 is larger than the `glyf' table size, makes 1337 FreeType handle the whole `glyf' table as a single glyph again and 1338 again, which is certainly invalid (and can be very slow, too). 1339 1340 * src/truetype/ttpload.c (tt_face_get_location): Implement. 1341 Improve tracing messages. 1342 13432016-09-25 Werner Lemberg <wl@gnu.org> 1344 1345 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo. 1346 13472016-09-24 Werner Lemberg <wl@gnu.org> 1348 1349 [autofit] Tracing fixes. 1350 1351 * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping 1352 functions only if we actually do tracing. 1353 13542016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com> 1355 1356 [smooth] Reduce divisions in the line renderer. 1357 1358 We don't need some divisions if a line segments stays within a single 1359 row or a single column of pixels. 1360 1361 * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions 1362 conditional. 1363 13642016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> 1365 1366 * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table. 1367 13682016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com> 1369 1370 [smooth] Another tiny speed-up. 1371 1372 * src/smooth/ftgrays.c (gray_find_cell): Merge into... 1373 (gray_record_cell): ... this function. 1374 13752016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> 1376 1377 * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code. 1378 13792016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> 1380 1381 [smooth] Fix valgrind warning and reoptimize. 1382 1383 The algorithm calls `gray_set_cell' at the start of each new contour 1384 or when the contours cross the cell boundaries. Double-checking for 1385 that is wasteful. 1386 1387 * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. 1388 (gray_convert_glyph): Remove initialization introduced by 44b172e88. 1389 13902016-09-10 Werner Lemberg <wl@gnu.org> 1391 1392 [sfnt] Fix previous commit. 1393 1394 Problems reported as 1395 1396 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40 1397 1398 We now map the strike index right before accessing the physical 1399 data, not earlier. 1400 1401 * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map' 1402 after creating the map so that... 1403 1404 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function 1405 can be used before and after setting up `sbit_strike_map'. 1406 (tt_face_set_sbit_strike): Revert change. 1407 (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index. 1408 1409 * src/truetype/ttdriver.c (tt_size_select): Revert change. 1410 14112016-09-09 Werner Lemberg <wl@gnu.org> 1412 1413 [ftfuzzer] Minor improvements. 1414 1415 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore 1416 invalid strikes. 1417 Use better values for call to `FT_Set_Char_Size'. 1418 14192016-09-09 Werner Lemberg <wl@gnu.org> 1420 1421 [sfnt] Don't provide (completely) broken strike data. 1422 1423 FreeType tries to sanitize strike header data; we now reject 1424 completely broken ones. 1425 1426 * include/freetype/internal/tttypes.h (TT_FaceRec): New 1427 `sbit_strike_map' array pointer. 1428 1429 * src/base/ftobjs.c (FT_Match_Size): Reject matches where either 1430 width or height would be zero. 1431 Add tracing message in case of error. 1432 1433 * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map', 1434 only using (more or less) valid strike header data for 1435 FT_Face's `available_sizes' array. 1436 (sfnt_done_face): Updated. 1437 1438 * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use 1439 `sbit_strike_map'. 1440 (tt_face_load_strike_metrics): Improve tracing. 1441 1442 * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'. 1443 14442016-09-08 Werner Lemberg <wl@gnu.org> 1445 1446 * Version 2.7 released. 1447 ======================= 1448 1449 1450 Tag sources with `VER-2-7'. 1451 1452 * docs/VERSION.TXT: Add entry for version 2.7. 1453 1454 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, 1455 builds/windows/vc2005/index.html, 1456 builds/windows/vc2008/freetype.vcproj, 1457 builds/windows/vc2008/index.html, 1458 builds/windows/vc2010/freetype.vcxproj, 1459 builds/windows/vc2010/index.html, 1460 builds/windows/visualc/freetype.dsp, 1461 builds/windows/visualc/freetype.vcproj, 1462 builds/windows/visualc/index.html, 1463 builds/windows/visualce/freetype.dsp, 1464 builds/windows/visualce/freetype.vcproj, 1465 builds/windows/visualce/index.html, 1466 builds/wince/vc2005-ce/freetype.vcproj, 1467 builds/wince/vc2005-ce/index.html, 1468 builds/wince/vc2008-ce/freetype.vcproj, 1469 builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/. 1470 1471 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7. 1472 (FREETYPE_PATCH): Set to 0. 1473 1474 * builds/unix/configure.raw (version_info): Set to 18:6:12. 1475 * CMakeLists.txt (VERSION_MINOR): Set to 7. 1476 (VERSION_PATCH): Set to 0. 1477 1478 * docs/CHANGES: Updated. 1479 14802016-09-08 Werner Lemberg <wl@gnu.org> 1481 1482 * src/truetype/ttinterp.c: Include `ttgxvar.h'. 1483 1484 This fixes the `multi' build. 1485 14862016-09-08 Werner Lemberg <wl@gnu.org> 1487 1488 [autofit] Another improvement to Armenian support. 1489 1490 Suggested by Hrant H Papazian <hpapazian@gmail.com>. 1491 1492 * src/autofit/afscript.h: Use better suited characters to derive 1493 default stem widths. 1494 14952016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com> 1496 1497 * src/smooth/ftgrays.c (gray_hline): Micro-optimize. 1498 14992016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com> 1500 1501 [smooth] Operate in absolute bitmap coordinates. 1502 1503 Simpler bitmap addressing improves performance by 1.5%. 1504 1505 * src/smooth/ftgrays.c (gray_TWorker): Remove count fields. 1506 (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline, 1507 gray_sweep, gray_convert_glyph, gray_raster_render): Updated. 1508 15092016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com> 1510 1511 [smooth] Improve contour start (take 2). 1512 1513 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly 1514 instead of... 1515 (gray_start_cell): ... this function, which is removed. 1516 (gray_convert_glyph): Make initial y-coordinate invalid. 1517 15182016-09-06 Werner Lemberg <wl@gnu.org> 1519 1520 [type1] MM fonts support exactly zero named instances (#48748). 1521 1522 * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero. 1523 15242016-09-06 Jonathan Kew <jfkthame@gmail.com> 1525 1526 [cff] Fix uninitialized memory. 1527 1528 Problem reported as 1529 1530 https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 1531 1532 * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage' 1533 array to handle a `get' opcode without a previous `put'. 1534 15352016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com> 1536 1537 * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert. 1538 15392016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com> 1540 1541 [smooth] Improve contour start. 1542 1543 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly 1544 instead of... 1545 (gray_start_cell): ... this function, which is removed. 1546 15472016-09-05 Werner Lemberg <wl@gnu.org> 1548 1549 [cff] Fix memory initialization. 1550 1551 * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' 1552 variants of FreeType's memory allocation macros don't do zeroing. 1553 15542016-09-05 Werner Lemberg <wl@gnu.org> 1555 1556 [ftrandom] Minor improvements. 1557 1558 * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to 1559 500. 1560 1561 * src/tools/ftrandom/Makefile (CFLAGS): Split off include 1562 directories to ... 1563 (INCLUDES): ... this new variable. 1564 (LDFLAGS): New variable. 1565 (ftrandom.o, ftrandom): Updated. 1566 15672016-09-05 Werner Lemberg <wl@gnu.org> 1568 1569 [autofit] Improve Armenian support. 1570 1571 Thanks to Hrant H Papazian <hpapazian@gmail.com> for help. 1572 1573 * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve 1574 selection of characters. 1575 1576 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 1577 15782016-09-04 Werner Lemberg <wl@gnu.org> 1579 1580 [ftrandom] Improve Makefile. 1581 1582 It now supports both a normal build (`./configure && make') and a 1583 development build (`make devel'). 1584 1585 * src/tools/ftrandom/Makefile (VPATH): Set it so that 1586 `libfreetype.a' gets searched in both `objs' (for the development 1587 build) and `objs/.libs' (for a normal build which uses libtool). 1588 (LIBS): Add missing libraries. 1589 (ftrandom.o): New rule. 1590 (ftrandom): Use automatic variables. 1591 15922016-09-03 Werner Lemberg <wl@gnu.org> 1593 1594 [truetype] More fixes for handling of GX deltas. 1595 1596 Problems reported by Bob Taylor <Bob.Taylor@monotype.com>. 1597 1598 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough 1599 sanity test for glyph variation array header size. 1600 Always set stream position before reading packed x and y deltas. 1601 Fix thinko w.r.t. `localpoints' array. 1602 16032016-09-03 Werner Lemberg <wl@gnu.org> 1604 1605 [ftrandom] Various fixes. 1606 1607 * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better 1608 default. 1609 (error_fraction): Make it of type `double' to work as advertized – 1610 this was completely broken. 1611 Update all related code. 1612 (error_count, fcnt): Make it unsigned to fix compiler warnings. 1613 Update all related code. 1614 (fontlist): Change `len' member to `long' to fix compiler warnings. 1615 (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag 1616 unused variables. 1617 (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings. 1618 (ExecuteTest): Ditto. 1619 Call `FT_Done_FreeType'. 1620 (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned 1621 int'. 1622 (usage): Improve output. 1623 (main): Fix compiler warnings. 1624 1625 * src/tools/ftrandom/README: Updated. 1626 16272016-09-03 Werner Lemberg <wl@gnu.org> 1628 1629 [base] Avoid negative bitmap strike dimensions (#48985). 1630 1631 * src/base/ftobjs.c (FT_Open_Face): Check whether negation was 1632 actually successful. For example, this can fail for value 1633 -32768 if the type is `signed short'. If there are problems, 1634 disable the strike. 1635 16362016-09-03 Werner Lemberg <wl@gnu.org> 1637 1638 [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). 1639 1640 * src/cff/cffload.c (cff_index_get_name): Check `byte_len'. 1641 16422016-09-02 Werner Lemberg <wl@gnu.org> 1643 1644 [unix] Enable 64bit support in file system access (#48962). 1645 1646 * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'. 1647 16482016-09-02 Werner Lemberg <wl@gnu.org> 1649 1650 [sfnt] Avoid left shift of negative value (#48980). 1651 1652 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned 1653 constant. 1654 16552016-09-02 Werner Lemberg <wl@gnu.org> 1656 1657 * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings. 1658 16592016-09-02 Werner Lemberg <wl@gnu.org> 1660 1661 Some preparations for the next release. 1662 1663 * include/freetype/config/ftoption.h 1664 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable. 1665 1666 * docs/CHANGES: Updated. 1667 16682016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com> 1669 1670 [smooth] Simplify span rendering more. 1671 1672 It turns out that there is significant cost associated with `FT_Span' 1673 creation and calls to `gray_render_span' because it happens so 1674 frequently. This removes these steps from our internal use but leaves 1675 it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain 1676 is about 5%. 1677 1678 * src/smooth/ftgrays.c (gray_render_span): Removed. The code is 1679 migrated to... 1680 (gray_hline): ... here. 1681 16822016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> 1683 1684 [smooth] Streamline pixmap drawing a bit more. 1685 1686 Zero coverage is unlikely (1 out of 256) to warrant checking. This 1687 gives 0.5% speed improvement in rendering simple glyphs. 1688 1689 * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks. 1690 16912016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com> 1692 1693 [smooth] Streamline pixmap drawing. 1694 1695 This gives 2% speed improvement in rendering simple glyphs. 1696 1697 * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a 1698 pointer to its bottom-left and pitch to be used in... 1699 (gray_TWorker): ... here. 1700 (gray_render_span): Move pixmap flow check from here... 1701 (gray_raster_render): .. to here. 1702 17032016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com> 1704 1705 [smooth] Reduce stack of band boundaries. 1706 1707 * src/smooth/ftgrays.c (gray_TBand): Removed. 1708 (gray_convert_glyph): Updated to stack band boundaries concisely. 1709 17102016-08-26 Werner Lemberg <wl@gnu.org> 1711 1712 * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'. 1713 17142016-08-26 Werner Lemberg <wl@gnu.org> 1715 1716 [cid] Fix commit from 2016-05-16. 1717 1718 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors. 1719 17202016-08-26 Werner Lemberg <wl@gnu.org> 1721 1722 [sfnt] Cache offset and size to bitmap data table. 1723 1724 This commit avoids `EBDT' and friends being looked up again and 1725 again while loading a single embedded bitmap. 1726 1727 * include/freetype/internal/tttypes.h (TT_FaceRec) 1728 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and 1729 `ebdt_size'. 1730 1731 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ... 1732 (tt_face_load_sbit): ... this function; also store the table size 1733 and offset. 1734 17352016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com> 1736 1737 * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks. 1738 17392016-08-26 Werner Lemberg <wl@gnu.org> 1740 1741 [type1] Fix heap buffer overflow. 1742 1743 Reported as 1744 1745 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 1746 1747 * src/type1/t1load.c (parse_charstrings): Reject fonts that don't 1748 contain glyph names. 1749 17502016-08-25 Werner Lemberg <wl@gnu.org> 1751 1752 [sfnt] Fix previous commit (#48901). 1753 1754 * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos. 1755 17562016-08-25 Werner Lemberg <wl@gnu.org> 1757 1758 [sfnt] Speed up handling of invalid format 4 cmaps. 1759 1760 * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add 1761 tests for `num_glyph' from `tt_cmap4_char_map_linear'. 1762 17632016-08-25 Werner Lemberg <wl@gnu.org> 1764 1765 * include/freetype/internal/ftdriver.h: Remove unused typedefs. 1766 17672016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com> 1768 1769 [smooth] Simplify span rendering. 1770 1771 This removes unnecessary complexity of span merging and buffering. 1772 Instead, the spans are rendered as they come, speeding up the 1773 rendering by about 5% as a result. 1774 1775 * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed. 1776 (gray_TWorker): Remove span buffer and related fields. 1777 (gray_sweep, gray_hline): Updated. 1778 1779 * include/freetype/ftimage.h: Remove documentation note about 1780 `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone. 1781 17822016-08-16 Werner Lemberg <wl@gnu.org> 1783 1784 [truetype] Fix `MPS' instruction. 1785 1786 According to Greg Hitchcock, MPS in DWrite really returns the point 1787 size. 1788 1789 * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member. 1790 1791 * src/truetype/ttdriver.c (tt_size_request): Set `point_size'. 1792 1793 * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize' 1794 member. 1795 1796 * src/truetype/ttinterp.c (TT_Load_Context): Updated. 1797 (Ins_MPS): Fix instruction. 1798 17992016-08-16 Werner Lemberg <wl@gnu.org> 1800 1801 [lzw] Optimize last commit. 1802 1803 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into 1804 conditional clause. 1805 18062016-08-16 Werner Lemberg <wl@gnu.org> 1807 1808 [lzw] Avoid invalid left shift. 1809 1810 Reported as 1811 1812 https://bugzilla.mozilla.org/show_bug.cgi?id=1295366 1813 1814 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'. 1815 18162016-08-16 Werner Lemberg <wl@gnu.org> 1817 1818 [lzw] Avoid buffer overrun. 1819 1820 Reported as 1821 1822 https://bugzilla.mozilla.org/show_bug.cgi?id=1273283 1823 1824 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't 1825 underflow. 1826 18272016-08-16 Werner Lemberg <wl@gnu.org> 1828 1829 [truetype] Fix compiler warning. 1830 1831 * src/truetype/ttgload.c (load_truetype_glyph): Add cast. 1832 18332016-08-13 Werner Lemberg <wl@gnu.org> 1834 1835 [winfonts] Avoid zero bitmap width and height. 1836 1837 Reported as 1838 1839 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 1840 1841 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. 1842 (FNT_Load_Glyph): Check for zero pitch. 1843 18442016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> 1845 1846 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes. 1847 18482016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> 1849 1850 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting. 1851 18522016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> 1853 1854 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries. 1855 18562016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com> 1857 1858 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. 1859 18602016-08-10 Werner Lemberg <wl@gnu.org> 1861 1862 [sfnt] Use correct type for `italicAngle' field (#48732). 1863 1864 * src/sfnt/ttload.c (tt_face_load_post): Fix types. 1865 18662016-08-06 Jon Spencer <jon@jonspencer.ca> 1867 1868 [sfnt] Fix `FT_Get_Advance' for bitmap strikes. 1869 1870 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the 1871 advance value from the font table and then scales it by the 1872 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't 1873 set that value for bitmap fonts and the advance gets scaled to zero. 1874 1875 Taken from 1876 1877 https://github.com/behdad/harfbuzz/issues/252 1878 1879 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) 1880 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values. 1881 18822016-08-06 Behdad Esfahbod <behdad@behdad.org> 1883 1884 [truetype] Fix GX variation handling of composites. 1885 1886 * src/truetype/ttgload.c (load_truetype_glyph) 1887 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag. 1888 18892016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com> 1890 1891 [smooth] Minor refactoring. 1892 1893 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line): 1894 Updated. 1895 18962016-07-29 Werner Lemberg <wl@gnu.org> 1897 1898 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'. 1899 1900 Since 2016-05-16 we detect infinite recursion directly. 1901 1902 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust 1903 `maxComponentDepth'. 1904 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if 1905 `maxComponentDepth' is not valid. Instead, simply adjust its value 1906 and emit a tracing message. 1907 19082016-07-26 Werner Lemberg <wl@gnu.org> 1909 1910 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor. 1911 1912 No functional change. 1913 19142016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net> 1915 1916 [truetype] Record the end of IDEFs. 1917 1918 To match the logic in FDEF. The value of the end is only used for 1919 bound-checking in `Ins_JMPR', so it may not have been obvious that 1920 it was not recorded. Tested (as part of Font Validator 2.0) all the 1921 fonts on Fedora and did not see any change. 1922 1923 * src/truetype/ttinterp.c (Ins_IDEF): Updated. 1924 19252016-07-19 Werner Lemberg <wl@gnu.org> 1926 1927 [truetype] Sanitizer fix, second try. 1928 1929 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary 1930 tests and use only one slot more. 1931 19322016-07-19 Werner Lemberg <wl@gnu.org> 1933 1934 [truetype] Sanitizer fix. 1935 1936 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array 1937 to fix nested loops. 1938 19392016-07-18 Werner Lemberg <wl@gnu.org> 1940 1941 [truetype] Make GETDATA work only for GX fonts. 1942 1943 * src/truetype/ttinterp.c (opcode_name): Updated. 1944 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. 1945 (TT_RunIns): Updated. 1946 19472016-07-17 Werner Lemberg <wl@gnu.org> 1948 1949 [truetype] Add support for Apple's 1950 1951 GETDATA[], opcode 0x92 1952 1953 bytecode instruction. It always returns 17, and we have absolutely 1954 no idea what it is good for... 1955 1956 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. 1957 (Ins_GETDATA): New function. 1958 (TT_RunIns): Add it. 1959 19602016-07-16 Werner Lemberg <wl@gnu.org> 1961 1962 [truetype] Add bytecode support for GX variation fonts. 1963 1964 This commit implements undocumented (but confirmed) stuff from 1965 Apple's old bytecode engine. 1966 1967 GETVARIATION[], opcode 0x91 1968 This opcode pushes normalized variation coordinates for all axes 1969 onto the stack (in 2.14 format). Coordinate of first axis gets 1970 pushed first. 1971 1972 GETINFO[], selector bit 3 1973 If GX variation support is enabled, bit 10 of the result is set 1974 to 1. 1975 1976 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H. 1977 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. 1978 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector 1979 bit 3, checking support for variation glyph hinting. 1980 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function 1981 to implement opcode 0x91. 1982 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91. 1983 19842016-07-16 Werner Lemberg <wl@gnu.org> 1985 1986 [truetype] Fix GETINFO bytecode instruction. 1987 1988 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for 1989 stretching information. 1990 19912016-07-16 Behdad Esfahbod <behdad@behdad.org> 1992 1993 [truetype] Make all glyphs in `Zycon' GX font work. 1994 1995 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary 1996 tests. 1997 19982016-07-16 Werner Lemberg <wl@gnu.org> 1999 2000 [truetype] Fix GX delta tracing. 2001 2002 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace 2003 relative point movements. 2004 20052016-07-16 Behdad Esfahbod <behdad@behdad.org> 2006 2007 [truetype] More fixes for GX. 2008 2009 This finally fixes the rendering of the cyclist and the lizard in 2010 the `Zycon' font. 2011 2012 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point 2013 index is always cumulative. 2014 2015 (tt_handle_deltas): Rename to... 2016 (tt_interpolate_deltas): ... This. 2017 Add new parameter for output point array. 2018 Update caller. 2019 2020 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds 2021 the intermediate results of `tt_interpolate_deltas' that are to be 2022 added to `outline->points'. 2023 20242016-07-15 Werner Lemberg <wl@gnu.org> 2025 2026 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko. 2027 2028 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. 2029 2030 Reported by Alexei. 2031 20322016-07-16 Nikolaus Waxweiler <madigens@gmail.com> 2033 2034 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error. 2035 2036 Problem reported by Hin-Tak Leung. 2037 20382016-07-15 Werner Lemberg <wl@gnu.org> 2039 2040 [autofit] Update and improve segment and edge tracing. 2041 2042 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace 2043 `delta' also. 2044 Don't show first point of segment as a replacement for `pos'; this 2045 is (a) misleading, since the difference to `pos' can be almost 2046 arbitrarily large in corner cases, and (b) it is better to have all 2047 segment data in font units instead of a single value given in output 2048 space coordinates. 2049 Improve layout. 2050 (af_glyph_hints_dump_edges): Show px->units and units->px conversion 2051 values for convenience. 2052 Improve layout. 2053 20542016-07-15 Werner Lemberg <wl@gnu.org> 2055 2056 [autofit] For edges, reject segments wider than 1px (#41334). 2057 2058 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. 2059 2060 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute 2061 `delta'. 2062 (af_latin_hints_compute_edges): Reject segments with a delta larger 2063 than 0.5px. 2064 20652016-07-14 Werner Lemberg <wl@gnu.org> 2066 2067 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro. 2068 20692016-07-14 Werner Lemberg <wl@gnu.org> 2070 2071 [sfnt] Fix `face_index' value in `FT_Face' for named instances. 2072 2073 * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. 2074 20752016-07-14 Werner Lemberg <wl@gnu.org> 2076 2077 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing. 2078 20792016-07-14 Behdad Esfahbod <behdad@behdad.org> 2080 2081 [truetype] Fix gxvar delta interpolation. 2082 2083 The coordinates of the base font should be used for interpolation 2084 purposes, NOT the current points (i.e., the result of accumulation 2085 of previous deltas). 2086 2087 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize 2088 `points_org' before looping over all tuples. 2089 2090 2091---------------------------------------------------------------------------- 2092 2093Copyright 2016-2018 by 2094David Turner, Robert Wilhelm, and Werner Lemberg. 2095 2096This file is part of the FreeType project, and may only be used, modified, 2097and distributed under the terms of the FreeType project license, 2098LICENSE.TXT. By continuing to use, modify, or distribute this file you 2099indicate that you have read the license and understand and accept it 2100fully. 2101 2102 2103Local Variables: 2104version-control: never 2105coding: utf-8 2106End: 2107