Log

Author Commit Date CI Message
Alexei Podtelezhnikov 22befeef 2021-10-07T22:41:56 Signedness revisions. This eliminates explicit casting by switching to unsigned fields. The revisions mostly impact the handling of CID fonts. * include/freetype/fttypes.h (FT_Data): Change to unsigned `length`. * include/freetype/t1tables.h (CID_FaceDictRec): Ditto for `sd_bytes`. (CID_FaceInfoRec): Ditto for `gd_bytes` and `gd_bytes`. * include/freetype/internal/tttypes.h (TT_LoaderRec): Ditto for `byte_len`. * src/cid/cidgload.c (cid_load_glyph): Updated. * src/cid/cidload.h (cid_get_offset): Update argument. * src/cid/cidload.c (cid_get_offset, cid_read_subrs, cid_face_open): Updated. * src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data): Updated. * src/psaux/psft.c (cf2_getT1SeacComponent): Updated. * src/truetype/ttgload.c (TT_Process_Composite_Glyph, load_truetype_glyph): Updated.
Jan Alexander Steffens (heftig) 842ec5ed 2021-10-07T00:46:14 meson.build (gen_docs): Use `current_source_dir` instead of `source_root`. These two are not equal when FreeType is used as a subproject, such as in `freetype-demos`. In that case, `source_root` points at the root project, causing the docs build to fail.
Alexei Podtelezhnikov 0f23ae2e 2021-10-05T16:28:40 * src/smooth/ftgrays.c (FT_DIV_MOD): Limit the ARM workaround.
Alexei Podtelezhnikov a1560406 2021-10-05T14:19:06 [builds/unix, builds/vms] Standardize `mmap` failure. * builds/unix/ftsystem.c (FT_Stream_Open): Check for MAP_FAILED. * builds/vms/ftsystem.c (FT_Stream_Open): Ditto. This should cover https://savannah.nongnu.org/patch/?5909 as well.
Hugh McMaster 467e49e8 2021-10-05T22:21:39 autogen.sh: Only copy submodules if building from a git branch. `autogen.sh` fails if building from a standard source tarball. Firstly, git expects to be called in a git repository, then `copy_submodule_files` blindly attempts to copy files. Debian, Ubuntu, Linux Mint, and other derivatives all run `autogen.sh` before compiling to regenerate build files. This patch ensures that various git commands are only called and 'dlg' files are only copied if `autogen.sh` is called from a git repository.
Alexei Podtelezhnikov bbab0a67 2021-10-04T23:55:46 * include/freetype/internal/ftgloadr.h: Add missing header. Noticed by Jouk Jansen.
Alexei Podtelezhnikov ec6a4588 2021-10-04T23:10:59 [pshinter] Additional clean-ups. * src/pshinter/pshalgo.h (psh_hint_table_find_strong_points): Streamline code. * src/pshinter/pshalgo.h (PSH_Glyph): Remove unused fields.
Alexei Podtelezhnikov 227445f6 2021-10-03T22:48:23 [pshinter] More convenient direction definition. It is easier to check directions using flags than integer values. * src/pshinter/pshalgo.h (PSH_Dir): Redefine directions. (PSH_PointRec): Use them as an enum type. * src/pshinter/pshalgo.c (psh_compute_dir): Modify return type. (psh_glyph_init, psh_hint_table_find_strong_points, psh_glyph_find_blue_points): Update users.
Alexei Podtelezhnikov d102a514 2021-10-03T22:45:42 [pshinter] Remove unnecessary check. * src/pshinter/pshalgo.c (psh_hint_table_find_strong_points): Do not check if direction is defined before checking how.
AnuthaDev 3a65f1a2 2021-10-02T10:52:15 CI: Hardcode meson version to fix build failure on windows
Alexei Podtelezhnikov 311764fa 2021-10-01T11:50:12 Additional `FT_MSB` macro definitions. * include/freetype/internal/ftcalc.h [__DECC,_CRAYC]: Use builtins and intrinsics.
Alexei Podtelezhnikov 68fae526 2021-09-30T22:59:04 * src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting.
Alexei Podtelezhnikov 1d79c892 2021-09-29T22:17:31 * src/tools/apinames.c: Facilitate OpenVMS linker options.
Alexei Podtelezhnikov dd0ccdc3 2021-09-28T22:57:58 * src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation.
Alexei Podtelezhnikov 12ef831f 2021-09-24T22:27:27 [builds/unix] Do not use autoconf SIZEOF. * builds/unix/ftconfig.h.in [FT_USE_AUTOCONF_SIZEOF_TYPES]: Removed. * builds/unix/configure.raw: Remove AC_CHECK_SIZEOF and update. After this commit, autoconf builds will fully rely on <limits.h> rather than falling back on it if AC_CHECK_SIZEOF failed for some reason. There is a risk that misconfigured cross-compilation might have wrong headers. Note that Meson and CMake builds always relied on <limits.h> for sizes and availability of integer types.
Alexei Podtelezhnikov 766b2c19 2021-09-24T22:14:22 Propagate sign when reading OFF3. Signed 24-bit values are extremely rare. FreeType only reads them in PFR fonts with bitmap strikes conditionally. They have not been seen in the known fonts. That is why this bug could never be discovered. `FT_FRAME_OFF3` propagates sign correctly. * include/freetype/internal/ftstream.h (FT_PEEK_OFF3, FT_PEEK_OFF3_LE): Propagate sign into 32-bit value. (FT_GET_OFF3, FT_READ_OFF3): Needed fixing but removed as unused.
Alexei Podtelezhnikov a69320a9 2021-09-24T22:06:44 [bdf] Simplify comment collection or lack thereof. BDF comments are neither actually collected nor retrieved. There is no need to be fancy with delimiters. * src/bdf/bdflib.c (_add_bdf_comment): Delimit comments with zeros... (bdf_load_font): ...and do not null-terminate comments additionally. (_bdf_parse_glyphs): Check if comments are kept, which they are not. (_bdf_parse_start): Minor clean up.
Alexei Podtelezhnikov a29e0200 2021-09-23T23:10:26 Use NULL for pointers only. * src/bdf/bdflib.c (*): Code changes. * include/freetype/freetype.h: Comments only. * src/cff/cffload.c, src/cff/cffobjs.c: Ditto. * src/winfonts/winfnt.c: Ditto.
Werner Lemberg 6d19b29f 2021-09-23T08:46:01 Minor documentation fixes and improvements.
Alexei Podtelezhnikov 3b573e45 2021-09-22T22:22:13 Reference `fopen` in the docs.
Alexei Podtelezhnikov 90b14882 2021-09-22T20:20:04 [bdf, pcf] Minor optimization. * src/pcf/pcfread.c (pcf_load_font): Do not call `FT_MulDiv` for a small job. * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto. * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a comment.
Alexei Podtelezhnikov b4dddd82 2021-09-22T00:30:03 [base] Initialize stream memory earlier. With Windows memory management tracking heap, it is important to use it during the stream opening fallback. In Unix, the argument is unused, but it is better to set it correctly. * src/base/ftobjs.c (FT_Stream_New): Set memory before calling `FT_Stream_Open`. * builds/windows/ftsystem.c, builds/unix/ftsystem.c (FT_Stream_Open, ft_close_stream_by_free): Call `ft_alloc` and `ft_free` with proper memory argumment.
Alexei Podtelezhnikov 93866bec 2021-09-21T23:14:42 [builds/windows] Revert back to `CreateFileA` only. Calling `CreateFileW` without making sure that the patname is really `wchar_t` is a bad idea and can lead to unpredictable overreads. For Windows CE, we impelemnt the missing API. Fixes #1098 and !76 again. * builds/windows/ftsystem.c (FT_Stream_Open): Call `CreateFileA`. [_WIN32_WCE] (CreateFileA, FileSizeEx): Implement missing interfaces.
Alexei Podtelezhnikov 892e7ead 2021-09-21T14:39:21 * src/bdf/bdflib.c (_bdf_parse_{start,glyphs}): Use appropriate scanner.
Alexei Podtelezhnikov 61903609 2021-09-20T22:18:29 Minor.
Alexei Podtelezhnikov 71969d1e 2021-09-20T14:31:45 * src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW.
Alexei Podtelezhnikov 52915898 2021-09-18T07:05:55 [cache] Minor clean-ups. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Remove parantheses. * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto. (FTC_Cache_RemoveFaceID): Remove unnecessary variable.
Alexei Podtelezhnikov 0b429b60 2021-09-17T08:31:27 [builds/windows] Try both wide and narrow `CreateFile` Windows handles wchar_t* UTF-16 and char* ANSI (presently UTF-8) filenames using alternative -A and -W API. We'll try them both when opening a file. This means that you should not worry about about conversions. Fixes #1098 and !76. * builds/windows/ftsystem.c (FT_Stream_Open): Call alternative `CreateFile` in the case of failure.
Edwin Steiner 6e1ef98a 2021-09-16T23:08:46 [cff] Explicitly set StandardEncoding or ExpertEncoding offsets. Fixes #1097. * src/cff/cffload.c (cff_encoding_load): Set special offset values.
Alexei Podtelezhnikov fce74b73 2021-09-16T17:03:19 [cache] Miscellaneous clean-ups. * src/cache/ftccache.c (ftc_get_top_node_for_hash, FTC_Cache_Clear): Remove barely used variables. (ftc_cache_add): Adjust casting. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove casting. * src/cache/ftcsbits.c (ftc_snode_load): Remove casting.
Alexei Podtelezhnikov 79d14cc2 2021-09-16T16:41:56 * src/cff/cffload.c (cff_fd_select_get): Remove casting.
Alexei Podtelezhnikov ae516e6a 2021-09-16T16:39:23 * src/pcf/pcfread.c (pcf_read_TOC): Remove casting.
Alexei Podtelezhnikov 801b7540 2021-09-14T22:55:50 Minor type adjustments. * src/cff/cffobjs.c (cff_face_init): Reduce casting. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Ditto. * src/type1/t1load.c (T1_Set_MM_Design): Ditto.
Alexei Podtelezhnikov 49270c17 2021-09-14T21:32:43 Replace boolean allocation macros with MEM ones. * src/base/ftbitmap.c (FT_Bitmap_Copy): Use MEM-macro. * src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Ditto. * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Ditto. * src/cache/ftccache.c (ftc_cache_init): Ditto * src/gzip/ftgzip.c (ft_gzip_alloc): Ditto. * src/psnames/psmodule.c (ps_unicodes_init): Ditto. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto. * src/sfnt/ttload.c (tt_face_load_name): Ditto.
Alexei Podtelezhnikov 9a4c846e 2021-09-14T21:25:47 [cache] Revert to some zeroing. * src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Zero `buckets` again to fix some crashes.
Alexei Podtelezhnikov 0a8ee851 2021-09-14T10:26:37 * src/pshinter/pshrec.c (ps_mask_table_merge_all): Tweak loops. Fixes fallout from 731d0b685685 reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38685
Alexei Podtelezhnikov 731d0b68 2021-09-13T16:29:08 [cff, pshinter] Clean up unsigned counters. Loops with unsigned decrement can be reliably stopped when the counter wraps around after reaching zero. * src/cff/cffload.c (cff_charset_compute_cids): Use unsigned counter. * src/pshinter/pshalgo.c (psh_hint_table_activate_mask): Ditto. * src/pshinter/pshrec.c (ps_mask_table_merge): Ditto.
Alexei Podtelezhnikov 058f3f2d 2021-09-13T16:24:25 [bdf, psnames, sfnt] Avoid some memory zeroing. * src/bdf/bdfdrivr.c (BDF_Face_Init): Use Q-macro. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto. * src/psnames/psmodule.c (src/psnames/psmodule.c): Remove zero.
Alexei Podtelezhnikov 59b43ae6 2021-09-13T16:16:18 * src/base/ftobjs.c (FT_CMap_New): Revert to zeroing. Fixes fallout from c1fa7aa2bc96, reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38641
Alexei Podtelezhnikov 073ff2d7 2021-09-13T00:04:45 [truetype] Clean up `exec` initialization. * src/truetype/ttinterp.c (Init_Context): Absorbed into... (TT_New_Context): ... this function.
Alexei Podtelezhnikov fab94f9f 2021-09-12T23:30:07 [truetype] Avoid some memory zeroing. * src/truetype/ttgload.c (load_truetype_glyph): Use Q-macro. * src/truetype/ttinterp.c (Update_Max): Ditto. * src/truetype/ttpload.c (src/truetype/ttpload.c): Ditto.
Alexei Podtelezhnikov c1fa7aa2 2021-09-12T23:25:46 [base] Avoid some memory zeroing. * src/base/ftobjs.c (FT_New_Size, FT_CMap_New, FT_CMap_Done, ft_open_face_internal, ft_open_face_internal): Use Q-macros.
Alexei Podtelezhnikov a8e8d9d7 2021-09-12T23:21:32 [cache, psaux] Remove zeros. * src/cache/ftcmru.c (FTC_MruList_New): Remove initialization. * src/psaux/psstack.c (cf2_stack_init): Ditto.
Alexei Podtelezhnikov 9870b6c0 2021-09-12T14:32:22 [cache] Avoid some memory zeroing. * src/cache/ftcmru.c (FTC_MruList_New): Use Q-macro. * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Ditto. * src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Ditto.
Alexei Podtelezhnikov 2d57b059 2021-09-11T10:38:08 * src/cache/ftcmanag.c (FTC_Manager_New): Add missing zero. Fixes fall out from a7b199d081e7.
Alexei Podtelezhnikov 5b626281 2021-09-10T10:19:07 [truetype] Tweak `hdmx` checking. Fixes #1096. * src/truetype/ttpload.c (tt_face_load_hdmx): Account for padding.
Alexei Podtelezhnikov e942a310 2021-09-09T22:17:46 [truetype] Tweak `loca` clamping. Fixes #1095. * src/truetype/ttpload.c (tt_face_load_loca): Fix up clamping. * include/freetype/internal/tttypes.h (TT_Face): Correct docs.
Alexei Podtelezhnikov c350aac0 2021-09-08T12:18:23 Fortify memory debugging (cont'd). * src/base/ftdbgmem.c (FT_DumpMemory): Check for active debugger. (ft_mem_table_destroy): Move `FT_DumpMemory` call from here... (ft_mem_debug_done): ... to here.
Alexei Podtelezhnikov 63806aad 2021-09-08T10:54:44 Fortify memory debugging. These changes are neccessary to properly recover `memory->user` that holds the Windows heap handle now. * src/base/ftdbgmem.c (ft_mem_debug_init): Handle all table allocations, initializations, and sizing instead of... (ft_mem_table_new): ... this function removed. (ft_mem_debug_done): Better check for the active debugger and free the debugger table here instead of... (ft_mem_table_destroy): ... here.
Werner Lemberg 77dcc5ed 2021-09-07T18:49:36 src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): Set to 600. This allows C99 compilation on Solaris. Problem reported by Mojca Miklavec.
Alexei Podtelezhnikov 7e26c7a6 2021-09-07T17:06:27 [builds/windows] Use native memory allocation API. * builds/windows/ftsystem.c (ft_alloc, ft_realloc, ft_free): Wrap HeapAlloc, HeapReAlloc, and HeapFree. (FT_New_Memory): Set the heap handle.
Werner Lemberg 60a93ea2 2021-09-07T06:38:09 [dlg] Synchronize with upstream. * src/dlg/dlgwrap.c (_XOPEN_SOURCE): Set to 600. Fixes #1093.
Alexei Podtelezhnikov aee1fd3b 2021-09-03T22:13:22 Cosmetic zeros.
Alexei Podtelezhnikov 7bf655b2 2021-09-03T11:31:41 * src/bdf/bdflib.c (_bdf_parse_start): Keep parser memory.
Werner Lemberg d1d3dc02 2021-09-02T22:12:07 autogen.sh: Make it work with old Solaris 10 shell.
Alexei Podtelezhnikov 7f8f0c1c 2021-09-02T23:30:31 [smooth, raster, sdf] Clean up initialization calls. * src/raster/ftraster.c (ft_black_init): Removed. (ft_black_new): Clean up. * src/sdf/ftbsdf.c (bsdf_raster_new): Ditto. * src/sdf/ftsdf.c (sdf_raster_new): Ditto. * src/smooth/ftgrays.c (gray_raster_new): Ditto.
Alexei Podtelezhnikov a7b199d0 2021-09-02T22:58:50 * src/cache/ftcmanag.c (FTC_Manager_New): Avoid some zeroing.
Alexei Podtelezhnikov 0a6f0f8f 2021-09-02T22:52:21 * src/bdf/bdflib.c (bdf_load_font): Remove memory shuffling.
Alexei Podtelezhnikov a81cf5aa 2021-09-02T22:10:57 Cosmetic zeros.
Alexei Podtelezhnikov 7482c98f 2021-09-01T22:18:29 [base] Clean up stream reading. * src/base/ftstream.c (FT_Stream_ReadUShort, FT_Stream_ReadUOffset, FT_Stream_ReadULong and their LE variants): Remove unnecessary initialization and slightly refactor. (FT_Stream_GetByte, FT_Stream_ReadByte): Rename to return unsigned value and align with sister functions. * include/freetype/internal/ftstream.h (FT_Stream_GetByte, FT_Stream_ReadByte): Update prototypes and caller macros.
Alexei Podtelezhnikov 612925ff 2021-09-01T21:37:21 s/0/NULL/ where appropriate.
Alexei Podtelezhnikov efa1a359 2021-08-30T09:38:25 * builds/windows/ftsystem.c (FT_Stream_Open): Fix double-close.
Alexei Podtelezhnikov b6c11d49 2021-08-30T07:09:53 [smooth] Reduce shift in multiply-shift optimization. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): Reduce shift. Smaller shifts that keep the division operands of FT_UDIVPREP within 32 bits result in slightly faster divisions, which is noticeable in the overall performance. The loss of precision is tolerable until the divisors (the components dx and dy) approach 32 - PIXEL_BITS. With PIXEL_BITS = 8, this corresponds to 65,000 pixels or the bitmap size that we refuse to render anyway. Using `ftbench -p -s60 -t5 -bc timesi.ttf`, Before: 8.52 us/op After: 8.32 us/op
Werner Lemberg d1c20005 2021-08-28T07:29:05 [truetype] Fix compilation if !TT_CONFIG_OPTION_BYTECODE_INTERPRETER. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): Compile function conditionally. (tt_face_vary_cvt) [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Add code. Fixes #1091.
Alexei Podtelezhnikov 6804ce29 2021-08-27T09:46:40 [builds/windows] Revise SSE2 settings. * builds/windows/vc2010/freetype.vcxproj [x64]: Remove explicit SSE2. * builds/windows/visualc/freetype.vcproj [Win32]: Add explicit SSE2.
Ben Wagner a842a098 2021-08-26T16:12:22 [smooth] Detect SSE2 with MSVC for x86 MSVC does not set `__SSE2__`. Instead one must check whether `_M_IX86_FP` is defined and greater than or equal to 2. * src/smooth/ftgrays.c (FT_SSE2): New macro. Use it where appropriate.
Alexei Podtelezhnikov 3785393d 2021-08-26T15:31:11 Expand comment (cont'd).
Alexei Podtelezhnikov 686e2a5e 2021-08-25T23:18:43 Expand comment.
Alexei Podtelezhnikov f7f9cb0d 2021-08-24T15:29:06 * src/smooth/ftgrays.c (gray_render_conic): Refactor redundancy.
suzuki toshiya 50318357 2021-08-25T00:31:26 [truetype] Fix for the family name shorter than 8 characters. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag): If the family name to be checked is shorter than 8 characters, do not check its syntax.
suzuki toshiya c4fc0e69 2021-08-24T12:29:47 [truetype] Simplify `trick_names'. * src/truetype/ttobjs.c (tt_check_trickyness_family): For the case that the beginning part of a long tricky family name is already registered as another tricky family name, no need to double-check the longer one. Such long tricky family names are removed from the `trick_names'.
suzuki toshiya 992382ba 2021-08-24T12:11:46 [truetype] Add 2 tricky font names. Additional fix for the issue #1087. * src/truetype/ttobjs.c (tt_check_trickyness_family): Add 2 tricky font names reported in #1087.
suzuki toshiya 2b3ccd6e 2021-08-24T11:43:11 [truetype] New function to skip the randomization tag. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag): New function to skip the randomization tag in the names of the fonts embedded in a PDF. It is used by tt_check_trickyness_family(), to keep from mistaking "DLC" in the randomization tag as a tricky font name. See discussion in: https://lists.nongnu.org/archive/html/freetype-devel/2021-02/msg00002.html For technical detail about the randomization tag, please find PDF Reference 5.5.3 "Font Subsets". Thanks to Justyna Wawrzynska for pointing out the issue caused by the randomization tag.
suzuki toshiya 1c23982d 2021-08-24T10:25:22 [truetype] Add checksums for 2 tricky fonts. Thanks to Ting717 for providing sample PDF. Fixes #1087. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add checksums for 2 tricky fonts `DFHei-Bd-WIN-HK-BF' and `DFMing-Md-WIN-HK-BF'.
Alexei Podtelezhnikov 78f2bd0b 2021-08-22T22:32:07 Whitespace formatting.
Alexei Podtelezhnikov d92aa23f 2021-08-22T13:12:45 Decorate const arguments. * src/base/ftglyph.c (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it. * include/freetype/ftglyph.h (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it.
Alexei Podtelezhnikov d62d583d 2021-08-20T23:40:49 [smooth] Clean up the null cell usage. Put the null cell at the end of the pool and store it explicitly so that we can use it as both the limit and the dumpster. * src/smooth/ftgrays.c (gray_TWorker): Store the last `cell_null` and remove unnecesary fields. (NULL_CELL_PTR, CELL_IS_NULL): Remove in favor of explicit `cell_null`. (gray_dump_cells, gray_set_cell, gray_sweep{,_direct}): Update callers. (gray_convert_glyph_inner): Trace remaining cells (oh well). (gray_convert_glyph): Set up `cell_null` and slightly improve the pool management.
Alexei Podtelezhnikov 6e9d8d31 2021-08-20T16:01:32 [base] Restore quiet no-op rendering of bitmap glyphs. Fixes #1076. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when rendering a bitmap glyph.
Alexei Podtelezhnikov de3b5c20 2021-08-20T13:51:40 [smooth] Fortify 64-bit algorithm. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): s/long/FT_Int64/ and s/unsigned long/FT_UInt64/. (gray_render_line): Adjust a critical variable type.
Carlo Bramini f0f00f7c 2021-08-19T22:14:42 * builds/windows/ftsystem.c (FT_Stream_Open): Support legacy Windows.
Alexei Podtelezhnikov ffdac8d6 2021-08-19T20:41:55 Determine `long long` availability based on its size. MSVC, for example, used `long long` even without full C99 support. * include/freetype/config/ftstdlib.h: Check if `long long` limits are defined in <limits.h>. * include/freetype/config/integer-types.h: Check `long long` size and use it to typedef FT_Int64.
Dominik Röttsches 633fe087 2021-08-19T16:56:22 [sfnt] Fix format expectation for `COLR` v1 ClipList * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Change ClipList format expectation to 1 instead of 0 to make it compliant with the latest spec.
Alexei Podtelezhnikov 02ba0fc8 2021-08-18T23:27:48 Readily use `long long` as a 64-bit type in C99 mode. * include/freetype/config/integer-types.h (FT_INT64): FT_CONFIG_OPTION_FORCE_INT64 is no longer required to use `long long`.
Alexei Podtelezhnikov 85703839 2021-08-18T23:05:51 Use FT_INT64 instead of FT_LONG64. * include/freetype/config/integer-types.h: Remove synonymous FT_LONG64. * include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/. * src/base/ftcalc.c: Ditto. * src/base/fttrigon.c: Ditto. * src/smooth/ftgrays.c: Ditto.
Alexei Podtelezhnikov e2cceed8 2021-08-18T11:36:33 [builds/windows] Do not set CharacterSet for VC++. * builds/windows/vc2010/freetype.vcxproj: s/Unicode/NotSet/. * builds/windows/visualc/freetype.vcproj: s/"1"/"0"/.
Werner Lemberg f44c2d58 2021-08-18T08:52:21 * src/sdf/ftsdf.c (get_control_box): Fix compiler warning.
Werner Lemberg f11f3ed1 2021-08-18T06:54:34 [base] Fix ppem size overflow. Fixes #1086. * src/base/ftobjs.c (FT_Request_Metrics): Add return value. Check whether ppem values fit into unsigned short values. (FT_Request_Size): Updated. * include/freetype/internal/ftobjs.h: Updated. * src/cff/cffobjs.c (cff_size_request), src/cid/cidobjs.c (cid_size_request), src/truetype/ttdriver.c (tt_size_request), src/type1/t1objs.c (T1_Size_Request): Updated.
Alexei Podtelezhnikov 536a10ac 2021-08-17T22:24:46 * builds/windows/ftsystem.c (FT_Stream_Open): Cast to remove warning.
Alexei Podtelezhnikov 5116f129 2021-08-17T22:08:45 * builds/windows/ftsystem.c (FT_Stream_Open): Support UNICODE compilation.
Werner Lemberg fed55210 2021-08-09T19:27:34 * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Minor fix.
Dominik Röttsches e40ae756 2021-08-09T13:44:55 [sfnt] Add missing blend mode 'plus' to 'COLR' v1. * include/freetype/ftcolor.h (FT_Composite_Mode): Add missing blend mode 'plus' after it was added to the spec.
Werner Lemberg 2c853b38 2021-08-08T00:22:34 include/freetype/freetype.h (FT_Encoding): Improve documentation. Based on a suggestion by Antony Lee <anntzer.lee@gmail.com>.
Werner Lemberg 18fc64e6 2021-08-07T17:11:57 [smooth] Avoid integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36243 * src/smooth/ftgrays.c(ADD_LONG, SUB_LONG, MUL_LONG, NEG_LONG) [STANDALONE_]: Removed, unused. (ADD_INT) [STANDALONE_]: New macro. (FT_INTEGRATE): Use ADD_INT.
Dominik Röttsches 47cf8ebf 2021-07-28T17:36:57 [sfnt] Add API for retrieving a 'COLR' v1 'ClipBox' table. The optional 'COLR' v1 glyph-specific clip box helps upstream graphics libraries allocate a sufficiently large bitmap for a glyph without having to traverse the glyph graph for that. See https://github.com/googlefonts/colr-gradients-spec/issues/251 for background on the introduction of this specification change. * include/freetype/ftcolor.h (FT_ClipBox): New structure. (FT_Get_Color_Glyph_ClipBox): New function declaration. * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_ClipBox_Func): New function type. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Use it. * src/base/ftobjs.c (FT_Get_Color_Glyph_ClipBox): New function to link API with SFNT implementation. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/ttcolr.c (Colr): New field `clip_list`. (tt_face_load_colr): Parse global clip list offset. (tt_face_get_color_glyph_clipbox): New function to find the clip box for a glyph id from the clip list array. * src/sfnt/ttcolr.h: Updated.
Werner Lemberg 6be8bfe4 2021-08-06T08:31:22 [smooth] Fix left shifts of negative numbers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36241 * src/smooth/ftgrays.c (LEFT_SHIFT): New macro. (gray_render_conic) [BEZIER_USE_DDA]: Use it.
Werner Lemberg 09195a82 2021-08-02T12:55:28 * meson.build: Fix zlib support. This commit synchronizes zlib support with both autotools and cmake: If no external zlib is found (or intentionally disabled on the command line), use the internal zlib by undefining `FT_CONFIG_OPTION_SYSTEM_ZLIB` without modifying `FT_CONFIG_OPTION_USE_ZLIB`. Also improve summary output. Problem reported by Moazin.
Anuj Verma be6ab319 2021-08-02T09:44:16 [sdf] Fix out-of-range-access. * src/sdf/ftbsdf.c (first_pass, second_pass): Fix range during forward pass. Otherwise the index goes out of range for the last column. Fixes issue #1077.
Anuj Verma ebcc96e5 2021-08-02T08:40:43 Fix invalid memory access in `bsdf` rasterizer. Do not generate SDF from bitmap if the `FT_GLYPH_OWN_BITMAP` flag is not set. In some cases the bitmap buffer is freed but still points to a valid address; to handle those cases check the flag before accessing the memory. * src/sdf/ftsdfrend.c (ft_bsdf_render): Handle the above case. Also, return an error message if the bitmap's rows/pitch is invalid, otherwise `slot->buffer` might be assigned to some invalid memory location. (ft_sdf_render): Same as above. Plus, move the outline back to original state after rasterization and not if any error occurs. Signed-off-by: Anuj Verma <anujv@iitbhilai.ac.in>
Heiko Becker 47b1a541 2021-07-27T23:30:16 * meson.build: Honor `--includedir` instead of hard-coding 'include'. Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Werner Lemberg d2367aba 2021-07-29T08:16:25 src/sfnt/ttcolr.c: Minor formatting.