summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [dlg] Fix compiler warnings.Werner Lemberg2020-12-042-0/+13
| | | | | | * src/dlg/dlgwrap.c: Duplicate some feature test macros from `dlg.c`, which must come first before loading standard headers. For example, `freetype.h` loads `stdio.h` if compiled in debug mode.
* Typos.Werner Lemberg2020-12-0414-14/+14
|
* * src/type42/t42parse.c: Fix `-Wformat` warnings.Werner Lemberg2020-12-042-2/+6
|
* [builds/unix] Check for 'pthread' library.Priyesh Kumar2020-12-043-0/+537
| | | | | | | | * builds/unix/ax_pthread.m4: New file, taken from 'autoconf-archive' git repository. * builds/unix/configure.raw: Check for 'pthread'; also check whether it works.
* [base] Implement vertical alignment of log printing.Werner Lemberg2020-12-044-24/+140
| | | | | | | | | | | | Based on a patch by Priyesh. * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH): New macro. * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_log_handler): Print logs after a fixed width to handle different lengths of `FT_COMPONENT` entries. Use `ft_strrchr` to check for final newline character.
* Update logging related documentation.Priyesh Kumar2020-12-043-0/+110
| | | | | | * docs/DEBUG: Updates related to `FT_LOGGING`. * README.git: Updates related to logging.
* * src/*: Fix `-Wformat` warnings.Priyesh Kumar2020-12-047-13/+17
|
* [builds/windows] Changes to build 'dlg' with FreeType on Windows.Priyesh Kumar2020-12-046-21/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | We only support Visual C++ 2010 and newer. * builds/windows/vc2010/script.bat: New windows batch file to copy necessary 'dlg' files from `submodules/dlg` to `src/dlg`. This file is used as a pre-built event in Visual C++. * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. * builds/windows/vc2010/freetype.vcxproj.filters: Add `src/dlgwrap.c`. * builds/windows/vc2010/freetype.vcxproj (AdditionalIncludeDirectories): Add include files of dlg for 'Debug' and 'Debug Static' configurations on both 'x64' and 'win32' platforms. (PreprocessorDefinitions): Add `FT_LOGGING` for 'Debug' and 'Debug Static' configurations on both 'x64' and 'win32' platforms. Add `DLG_STATIC' for 'Debug' configuration on 'x64' and 'win32' platforms. (DisableLanguageExtensions): We need to disable the `/Za` option when building 'dlg' with FreeType as 'dlg' strictly follows the C99 standard. Visual C++ produces behaves unexpectedly when compiling a C99 file with `/Za` option enabled.
* [base] Add public API to change log handling function.Priyesh Kumar2020-12-044-7/+152
| | | | | | | | | | | | | | | | | | * include/freetype/ftlogging.h (FT_Custom_Log_Handler): New function typedef to store the custom callback logging function. (FT_Set_Log_Handler, FT_Set_Default_Log_Handler): New functions to set and reset custom log handler. * include/freetype/internal/ftdebug.h (custom_output_handler): New variable to support a custom callback logging function. (FT_Logging_Callback): A new function typedef to print log using custom callback logging function, which is set using `FT_Set_Log_Handler`. (FT_Log): Use it. * src/base/ftdebug.c (FT_Set_Log_Handler, FT_Set_Default_Log_Handler, FT_Logging_Callback): Add function definitions.
* [base] Add public API to change the levels of tracing components.Priyesh Kumar2020-12-015-2/+163
| | | | | | | | | | | | | | | * include/freetype/ftlogging.h: New header file. * include/freetype/internal/ftdebug.h [FT_LOGGING]: Include `ftlogging.h`. * src/base/ftdebug.c (ft_custom_trace_level): New variable. (ft_debug_init): Update to support change of levels of tracing components of FreeType at run-time. (FT_Trace_Set_Level): New function to change the levels of tracing components at run-time. (FT_Trace_Set_Default_Level): New function to reset the levels of tracing components back to default.
* [base] Updates to print timestamp and name of `FT_COMPONENT` in logs.Priyesh Kumar2020-12-013-6/+143
| | | | | | | | | | | | | | | | * include/freetype/internal/ftdebug.h (FT_LOGGING_TAG, FT_LOGGING_TAG_): New macros to resolve the value of `FT_COMPONENT' into a string. (ft_add_tag, ft_remove_tag): New functions to add and remove dlg tags. * src/base/ftdebug.c: Add new variables to control the logging of timestamp and name of `FT_COMPONENT` along with actual logs. (ft_add_tag, ft_remove_tag): Add function definitions. (ft_log_handler): Updates to print timestamp and name of `FT_COMPONENT`. (ft_debug_init) [FT_LOGGING]: Users can now control the logging of timestamp and name of `FT_COMPONENT` by adding tags in the `FT2_DEBUG` environment variable.
* [base] Add functions and variables to print logs to a file.Priyesh Kumar2020-12-015-9/+215
| | | | | | | | | | | | | | | | | | | | * include/freetype/internal/ftdebug.h: Added dlg's header files. (FT_LOG): New macro to redirect trace logs to dlg's API's whenever `FT_LOGGING' is defined. (ft_logging_init, ft_logging_deinit): New functions to handle initialization and uninitialization of logging related variables. (ft_log_handler): New function to handle logs of FreeType. * src/base/ftdebug.c: Add necessary logging related variables. (ft_logging_init, ft_logging_deinit, ft_log_handler): Add function definitions. * src/base/ftinit.c (FT_Init_FreeType) [FT_LOGGING]: Call `ft_logging_init`. (FT_Done_FreeType) [FT_LOGGING]: Call `ft_logging_deinit`. * src/base/ftobjs.c (FT_New_Library): Call `ft_debug_init` only if `FT_LOGGING` is not defined.
* [builds] Necessary changes to make 'dlg' compile.Priyesh Kumar2020-12-018-5/+203
| | | | | | | | | | | | | | | | | | | | | | | | * autogen.sh (copy_submodule_files): New script to copy all the necessary source and include files from `submodules/dlg` to `src/dlg`. * src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables the build of 'dlg' if the `FT_LOGGING` macro is defined. * src/dlg/rules.mk: New sub-Makefile. * builds/freetype.mk (DLG_DIR): New variable to include the header files of the 'dlg' library. (INCLUDES): Add `DLG_DIR`. (FT_CFLAGS): Add `-std=c99' flag. Include `src/dlg/rules.mk` file to build 'dlg' library. (OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`. * builds/toplevel.mk: For builds directly from the git repository we need to copy files from `submodule/dlg` to `src/dlg`. * include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING): New macro to enable or disable the logging facility in FreeType.
* * .gitmodules: Add 'dlg' library's git repository as submodule.Priyesh Kumar2020-12-013-0/+7
|
* * src/tools/chktrcmp.py (trace_use_pat): Update to current use.Werner Lemberg2020-12-012-2/+6
|
* builds/meson/*: Add copyright boilerplate.Werner Lemberg2020-11-275-1/+51
|
* .mailmap: Updated and sorted.Werner Lemberg2020-11-251-5/+13
|
* [cff,cid,type1] Demote old engine for lack of CFF2.Alexei Podtelezhnikov2020-11-205-12/+12
| | | | | | * src/cff/cffobjs.c (cff_iriver_init): Always default to Adobe engine. * src/cid/cidobjs.c (cid_driver_init): Ditto. * src/type1/t1objs.c (T1_Driver_Init): Ditto.
* Downgrade property tracing.Alexei Podtelezhnikov2020-11-205-18/+18
|
* * src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.Werner Lemberg2020-11-092-0/+23
|
* * meson.build: Fix .pc file generation.Werner Lemberg2020-11-042-3/+16
| | | | | | | For backwards compatibility we need the libtool version, not the .so number. Reported by Nikolaus.
* Typo.Werner Lemberg2020-11-041-1/+1
|
* docs/CHANGES: Updated.Werner Lemberg2020-11-041-36/+49
|
* Fix documentation build.Jan Alexander Steffens (heftig)2020-11-031-2/+1
| | | | | | | The empty line after `* @description:` caused the refdoc build to fail, see https://github.com/freetype/docwriter/issues/77
* Mention external modules.Alexei Podtelezhnikov2020-11-021-3/+5
|
* Minor clean-ups of last commit.Werner Lemberg2020-10-312-28/+36
|
* Better scan converter documentation.Alexei Podtelezhnikov2020-10-301-47/+49
|
* Add preamble.Alexei Podtelezhnikov2020-10-302-0/+22
|
* Avoid non-ASCII character in public header file.Werner Lemberg2020-10-301-1/+1
|
* ftimage.h: Improve description of `FT_Span`.Werner Lemberg2020-10-301-1/+13
| | | | From Piotr Grochowski <piotrunio-2004@wp.pl>.
* [truetype] Minor update to forthcoming OpenType 1.8.4 standard.Werner Lemberg2020-10-282-0/+16
| | | | | * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Limit size of `regionCount`.
* * meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347).Werner Lemberg2020-10-262-4/+16
| | | | | | Without this patch, 'harfbuzz' and 'brotli' are always required. Patch submitted anonymously in Savannah bug report.
* * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak (#59322).Ben Wagner2020-10-232-0/+8
| | | | | The issue is that `rows` is allocated but will not be freed in the event that the call to `png_read_image` fails and calls `longjmp`.
* * Version 2.10.4 released.VER-2-10-4Werner Lemberg2020-10-2014-15/+54
| | | | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-10-4'. * docs/VERSION.TXT: Add entry for version 2.10.4. * docs/CHANGES: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.10.3/2.10.4/, s/2103/2104/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.raw (version_info): Set to 23:4:17. * CMakeLists.txt (VERSION_PATCH): Set to 4.
* [sfnt] Fix heap buffer overflow (#59308).Werner Lemberg2020-10-192-7/+15
| | | | | | This is CVE-2020-15999. * src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier.
* * src/sfnt/tt{colr,cpal}.c: Fix signedness warnings from VC++.Alexei Podtelezhnikov2020-10-183-9/+13
|
* * src/sfnt/sfwoff2.c (Read255UShort): Tweak types to please VC++.Alexei Podtelezhnikov2020-10-172-4/+8
|
* Unnest markdown.Alexei Podtelezhnikov2020-10-111-1/+1
|
* * Version 2.10.3 released.VER-2-10-3Werner Lemberg2020-10-1013-15/+38
| | | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-10-3'. * docs/VERSION.TXT: Add entry for version 2.10.3. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.10.2/2.10.3/, s/2102/2103/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 23:3:17. * CMakeLists.txt (VERSION_PATCH): Set to 3.
* Document changes to last release.Werner Lemberg2020-10-106-11/+61
|
* [autofit] Synchronize with ttfautohint.Werner Lemberg2020-09-258-114/+214
| | | | | | | | | | | | | | | | This corresponds to the following commits in the ttfautohint git repository: bb6842bd3bd437b7b4a7921b0376c860f5e73d18 Typo, formatting. d5c91ddb1cb310257a3dfe9a8e20e1fc51335faa Add Medefaidrin script. * src/autofit/afblue.dat: Add blue zone data for Medefaidrin. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Medefaidrin standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Medefaidrin data.
* Move `scripts/make_distribution_archives.py` to `src/tools`.Werner Lemberg2020-09-252-5/+17
| | | | | | | | | | * scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR, _SCRIPT_DIR): Updated to new location. (main): s/shutils.copyfile/shutils.copy/ to preserve file permissions. (main): Prefix source file paths with `git_dir` while copying files to allow calls of the script from other places than the top-level directory.
* * src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`.Werner Lemberg2020-09-242-4/+17
| | | | | | | | | Towards the end of the the function there is a call to `FT_Outline_Get_CBox` that retrieves the glyph bbox in scaled units. That sets `horiBearing{X,Y}` and `vertBearingX` but `vertBearingY` is left alone, and is not scaled. Patch from Eric Muller <emuller@amazon.com>.
* * src/base/ftobjs.c (FT_Load_Glyph): Trace glyph metrics.Werner Lemberg2020-09-242-0/+23
|
* [meson] Move auxiliary scripts to `builds/meson`.Werner Lemberg2020-09-227-8/+19
| | | | | | | | | Suggested by Alexei. * scripts/*.py: Move meson scripts to... * builds/meson/*.py: ... this new location. * meson.build: Updated.
* Add python script for building tarballs.David Turner2020-09-212-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scripts/make_distribution_archives.py: New file. This standalone Python script should be equivalent to running `make dist` with the Make-based build system, with the following minor differences: - Since `make distclean` doesn't always clean up `objs/` properly, `make dist` archives may contain some stale binaries like `objs/.libs/libfreetype.so.6` or others. - `config.guess` and `config.sub` are not updated unless option `--gnu-config-dir=DIR` is used to specify the location of these files. - Some bits of the auto-generated reference documentation may appear in slightly different order, probably due to issues related to mkdocs and docwriter. As an example, the call scripts/make_distribution_archives.py /tmp/freetype2-dist creates the following files under `/tmp/freetype2-dist`: freetype-<version>.tar.gz freetype-<version>.tar.xz ft<winversion>.zip
* * scripts/extract_freetype_version.py: Fix regex typos.Werner Lemberg2020-09-212-3/+7
|
* Add Meson build project file.David Turner2020-09-219-1/+1038
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example usage: # Configure Meson build in directory `build-meson` to generate # release binaries comparable to to the ones from the # autotools/make build system. meson setup build-meson \ --prefix=/usr/local \ --buildtype=debugoptimized \ --strip \ -Db_ndebug=true # After configuring the Meson build with the above command, # compile and install to `/usr/local/`; this includes a pkg-config # file. ninja -C build-meson install # Alternatively, compile and install to `/tmp/aa/usr/local/...` # for packaging. DESTDIR=/tmp/aa ninja -C build-meson install # Generate documentation under `build-meson/docs`. ninja -C build-meson docs Library size comparison for stripped `libfreetype.so` generated by all three build systems: - Default build (autotools + libtool): 712 KiB - CMake build (RelWithDebInfo): 712 KiB - Meson build: 712 KiB * meson.build: New top-level Meson build file for the library. * meson_options.txt: New file. It holds user-selectable options for the build, which can be printed with `meson configure`, and selected at `meson setup` or `meson --reconfigure` time with `-D<option>=<value>`. * scripts/parse_modules_cfg.py: A script invoked by `meson.build` to parse `modules.cfg` and extract important information out of it (i.e., the list of modules). * scripts/process_ftoption_h.py: New script invoked by `meson.build` to process the original `ftoption.h` file. It enables or disables configuration macro variables based on the available dependencies. This is similar to what other build systems are using (i.e., Meson's `configure_file()` command is not used here). * scripts/extract_freetype_version.py: New script invoked by `meson.build` to extract the FreeType version number from `<freetype/freetype.h>`. * scripts/extract_libtool_version.py: New script invoked by `meson.build` to extract the libtool `revision_info` data from `builds/unix/configure.raw`, and to generate the corresponding shared library suffix. * scripts/generate_reference_docs.py: New script invoked by `meson.build` to generate the FreeType 2 reference documentation (using the `docwriter` and `mkdocs` packages, which must be already installed).
* Documentation updates.Alexei Podtelezhnikov2020-09-183-27/+30
|
* [raster] Improve the second pass (#58373).Alexei Podtelezhnikov2020-09-112-23/+58
| | | | | | | | | | Besides dropout control the second horizontal sweep is supposed to clean up straight horizontal edges that are mishandled by the first vertical sweep when a line passes through pixel centers. This line would present as perfectly aligned span edges in the second sweep. * src/raster/ftraster.c (Horizontal_Sweep_Span): Replace the old implementation with a better one focusing on aligned span edges only.