summaryrefslogtreecommitdiff
path: root/include/freetype/config
Commit message (Collapse)AuthorAgeFilesLines
* [truetype] Hide Infinality.Alexei Podtelezhnikov2023-02-171-40/+7
| | | | | | | | Remove Infinality as an option before its complete extraction. * include/freetype/ftoption.h: Remove the Infinality option. * devel/ftoption.h: Ditto. * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Is 40 now.
* Avoid reserved identifiers that are globally defined.Werner Lemberg2023-02-081-4/+4
| | | | | | | | | | | This is mandated by the C99 standard, and clang 15 produces zillions of warnings otherwise. * devel/ftoption.h, include/freetype/config/ftoption.h, include/freetype/internal/ftmemory.h, src/autofit/afhints.h, src/autofit/afmodule.c, src/autofit/aftypes.h, src/base/ftadvanc.c, src/base/ftdbgmem.c, src/base/ftstream.c, src/bdf/bdflib.c, src/truetype/ttinterp.c: Replace identifiers of the form `_foo` with `foo_`.
* Update all copyright notices.Werner Lemberg2023-01-177-7/+7
|
* Add `TT_CONFIG_OPTION_NO_BORING_EXPANSION` configuration macro.Dominik Röttsches2022-11-121-0/+18
| | | | | | | | | | | This gives users a possibility to deactivate new features not (yet) in the OpenType standard. * include/freetype/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_NO_BORING_EXPANSION): New macro. * src/truetype/ttgxvar.c (ft_var_load_avar): Use it to disable 'avar' version 2.0 support.
* Minor comment changes.Werner Lemberg2022-10-101-4/+4
|
* Add 'svg' module for OT-SVG rendering.Moazin Khatti2022-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * CMakeLists.txt (BASE_SRCS): Add svg module file. * meson.build (ft2_public_headers): Add `otsvg.h`. * modules.cfg (RASTER_MODULES): Add `svg` module. * builds/meson/parse_modules_cfg.py: Add svg module. * include/freetype/config/ftmodule.h: Add `ft_svg_renderer_class`. * include/freetype/fterrdef.h: Add `Invalid_SVG_Document` and `Missing_SVG_Hooks` error codes. * include/freetype/internal/fttrace.h: Add tracing for `otsvg`. * include/freetype/internal/svginterface.h: New file. It adds an interface to enable the presetting hook from the `base` module. * include/freetype/otsvg.h (SVG_Lib_Init_Func, SVG_Lib_Free_Func, SVG_Lib_Render_Func, SVG_Lib_Preset_Slot_Func): New hooks for SVG rendering. (SVG_RendererHooks): New structure to access them. * src/base/ftobjs.c: Include `svginterface.h`. (ft_glyphslot_preset_bitmap): Add code for presetting the slot for SVG glyphs. (ft_add_renderer): Updated. * src/svg/*: New files.
* Add code to load OT-SVG glyph documents.Moazin Khatti2022-01-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/freetype/config/ftheader.h (FT_OTSVG_H): New macro. * include/freetype/freetype.h (FT_FACE_FLAG_SVG, FT_HAS_SVG): New macros. (FT_LOAD_SVG_ONLY): New internal macro. * include/freetype/ftimage.h (FT_Glyph_Format): New enumeration value `FT_GLYPH_FORMAT_SVG`. * include/freetype/internal/ftobjs.h (FT_GLYPH_OWN_GZIP_SVG): New macro. * include/freetype/internal/fttrace.h: Add `ttsvg` for `ttsvg.c`. * include/freetype/internal/sfnt.h(load_svg, free_svg, load_svg_doc): New functions. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `svg` for the SVG table. * include/freetype/otsvg.h (FT_SVG_DocumentRec): New structure to hold the SVG document and other necessary information of an OT-SVG glyph in a glyph slot. * include/freetype/tttags.h (TTAG_SVG): New macro. * src/base/ftobjs.c: Include `otsvg.h`. (ft_glyphslot_init): Allocate `FT_SVG_DocumentRec` in `slot->other` if the SVG table exists. (ft_glyphslot_clear): Free it upon clean-up if it is a GZIP compressed glyph. (ft_glyphslot_done): Free the document data if it is a GZIP compressed glyph. (FT_Load_Glyph): Don't auto-hint SVG documents. * src/cache/ftcbasic.c (ftc_basic_family_load_glyph): Add support for FT_GLYPH_FORMAT_SVG. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttsvg.c`. * src/sfnt/sfdriver.c: Include `ttsvg.h`. (sfnt_interface): Add `tt_face_load_svg`, `tt_face_free_svg` and `tt_face_load_svg_doc`. * src/sfnt/sfnt.c: Include `ttsvg.c`. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Add code to load and free data of the the SVG table. * src/sfnt/ttsvg.c: New file, implementing `tt_face_load_svg`, `tt_face_free_svg` and `tt_face_load_svg_doc`. * src/sfnt/ttsvg.h: Declarations of the SVG functions in `ttsvg.c`.
* Add flag `FT_CONFIG_OPTION_SVG`.Moazin Khatti2022-01-201-1/+15
| | | | | | | | | This flag is going to be used to conditionally compile support for OT-SVG glyphs. FreeType will do the parsing and rely on external hooks for rendering of OT-SVG glyphs. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_SVG): New flag.
* Add Watcom C/C++ support.Ozkan Sezer2022-01-141-2/+3
| | | | | | * include/freetype/config/integer-types.h: Make sure `long long` is used then available. * include/freetype/internal/ftcalc.h (FT_MSB): Add Watcom C/C++ pragma.
* Update all copyright notices.Werner Lemberg2022-01-117-7/+7
|
* * builds/unix/configure.raw: Restore `SYSTEM_ZLIB` variable.Werner Lemberg2022-01-021-0/+4
| | | | This was accidentally removed with commit 93ebcbd0 almost eight years ago.
* Update `CHANGES` files, other minor whitespace and documentation issues.Werner Lemberg2021-11-221-1/+1
|
* Avoid undefined left-shifts.Werner Lemberg2021-11-201-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | We really have to use double casts to avoid issues with C's and C++'s signedness propagation rules in implicit casts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182 * include/freetype/config/public-macros.h (FT_STATIC_CAST, FT_REINTERPRET_CAST): Modify macro to take two arguments. Update all callers. (FT_STATIC_BYTE_CAST): New macro. * include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * include/freetype/fttypes.h (FT_MAKE_TAG): Ditto. Use `FT_Tag` for casting. * src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed. (FT_STATIC_BYTE_CAST): New macro. * src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with... (FT_STATIC_BYTE_CAST): ... this.
* Provide C++ versions for public macros with casts.Werner Lemberg2021-11-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Many FreeType clients use C++. However `g++ -Wold-style-cast` warns for macros with C-style casts even for system header files; this also affects directories included with `-isystem`. While this could be seen as a problem with g++, the problem is more a philosophical one: Over the time, C and C++ diverged more and more, and some features of C are no longer the 'right' solution in C++. * include/freetype/config/public-macros.h (FT_STATIC_CAST, FT_REINTERPRET_CAST): New macros. * include/freetype/freetype.h (FT_ENC_TAG, FT_LOAD_TARGET_, FT_LOAD_TARGET_MODE): Use `FT_STATIC_CAST`. Correctly handle negative 'signed char' input. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * include/freetype/fttypes.h (FT_MAKE_TAG, FT_BOOL): Ditto. * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): Use `FT_REINTERPRET_CAST`. * src/smooth/ftgrays.c (FT_STATIC_CAST)[STANDALONE_]: New macro. [!STANDALONE]: Include `FT_CONFIG_CONFIG_H`. Fixes #1116.
* Whitespace formatting.Alexei Podtelezhnikov2021-08-221-1/+1
|
* Determine `long long` availability based on its size.Alexei Podtelezhnikov2021-08-192-2/+24
| | | | | | | | | 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.
* Readily use `long long` as a 64-bit type in C99 mode.Alexei Podtelezhnikov2021-08-181-9/+8
| | | | | * include/freetype/config/integer-types.h (FT_INT64): FT_CONFIG_OPTION_FORCE_INT64 is no longer required to use `long long`.
* Use FT_INT64 instead of FT_LONG64.Alexei Podtelezhnikov2021-08-181-8/+1
| | | | | | | | * 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.
* Small clean-ups for the last few commits.Werner Lemberg2021-07-121-2/+1
| | | | * include/freetype/fttrace.h (afwarp): Removed.
* Remove experimental auto-hinting 'warp' mode.David Turner2021-07-121-18/+0
| | | | | | | This feature was always experimental, and probably nevery worked properly. This patch completely removes it from the source code, except for a documentation block describing it for historical purpose.
* Prioritize the anti-aliasing renderer module.Alexei Podtelezhnikov2021-05-181-2/+2
| | | | | * modules.cfg: Reorder the renderers. * include/freetype/config/ftmodule.h: Ditto.
* Update all copyright notices.Werner Lemberg2021-01-177-7/+7
|
* Add config option to test for 'COLR' v1 support in headers.Dominik Röttsches2021-01-141-0/+15
| | | | | | | | | * include/freetype/config/ftoption.h (TT_SUPPORT_COLRV1): New macro so that clients can test whether the FreeType checkout that they are building against supports the 'COLR' v1 API. This is intended to be a temporary solution until 'COLR' v1 support is released in a FreeType version and such a check can be made by using the version number instead.
* [sdf] Add 'sdf' module to non-gnumake build systems.Anuj Verma2020-12-241-0/+2
| | | | | | | * include/freetype/config/ftmodule.h: Add both the 'sfd' and 'bsfd' renderers to the list of modules. * CMakeLists.txt (BASE_SRCS): Add 'sdf' single-object module.
* */*: s/FT_LOGGING/FT_DEBUG_LOGGING/.Werner Lemberg2020-12-071-1/+1
|
* [build] Use gcc (and clang) in C99 mode.Werner Lemberg2020-12-051-0/+2
| | | | | | | | | | | | Other compilers are unchanged. * builds/compiler/gcc-dev.mk, builds/compiler/gcc.mk (ANSIFLAGS): s/-ansi/-std=c99/. * builds/freetype.mk (FT_CFLAGS): Remove `-std=c99`. * builds/unix/configure.raw: Handle C99. Remove no longer needed test for gcc 4.6 and earlier.
* [builds] Necessary changes to make 'dlg' compile.Priyesh Kumar2020-12-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Minor typos, formatting.Werner Lemberg2020-08-041-1/+1
|
* Formatting, improving comments.Werner Lemberg2020-07-281-58/+78
|
* [build] Really fix multi and C++ builds.David Turner2020-07-071-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | The following builds were still failing due to previous changes: make multi make multi CC="c++" make CC="c++" This patch fixes the issues, which were missing includes to get the right macro definitions in multi-build mode. Also, `FT_UNUSED' is actually used by third-party code, so move it back to `public-macros.h' to avoid breaking it. * include/freetype/config/public-macros.h (FT_EXPORT): Remove special definition for C++. (FT_UNUSED): Define here instead of... * include/freetype/config/compiler-macros.h: ... here. (FT_FUNCTION_DECLARATION): Remove special definition for C++. (FT_LOCAL_ARRAY_DEF): Fix definition. * src/cache/ftccback.h, src/lzw/ftzopen.h, src/gxvalid/gxvmort.h, src/gxvalid/gxvmorx.h: Add `FT_BEGIN_HEADER' and `FT_END_HEADER'.
* [build] Fix multi and C++ builds.David Turner2020-07-062-11/+12
| | | | | | | | | | | | | | | | | | The following builds were failing due to previous changes: make multi make multi CC="c++" * include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'. * include/freetype/config/ftheader.h (FT_BEGIN_HEADER, FT_END_HEADER): Protect against redefinition. * src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h, src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h, src/sfnt/woff2tags.h: Include `compiler-macros.h'. * src/sfnt/woff2tags.c: Include `woff2tags.h'.
* [build] Improve visibility support of library function names.David Turner2020-07-051-26/+29
| | | | | | | | | | | | | | | | | | | | | * include/freetype/config/public-macros.h (FT_PUBLIC_FUNCTION_ATTRIBUTE): New macro to tag functions as public (and thus exportable). (FT_EXPORT): Use it. * include/freetype/config/compiler-macros.h (FT_INTERNAL_FUNCTION_ATTRIBUTE): New macro to tag functions as internal to the library (and thus hidden). Note that on ELF systems, all internal functions have hidden visibility, which avoids the need to enforce this when invoking the compiler (e.g., with an option like `-fvisibility=hidden'). (FT_FUNCTION_DECLARATION, FT_FUNCTION_DEFINITION): New base macros to deal with C and C++ linkage issues at the same time. (FT_LOCAL, FT_LOCAL_DEF, FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF, FT_BASE, FT_BASE_DEF, FT_EXPORT_VAR, FT_BASE_CALLBACK, FT_BASE_CALLBACK_DEF): Redefined using new macros.
* [build] Split off more stuff from `ftconfig.h'.David Turner2020-07-052-261/+88
| | | | | | | | | | | | | | | * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off macro definitions required by the FreeType API headers to... * include/freetype/config/public-macros.h: ...this new file. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off macro definitions used by the library but not to be exposed to clients to... * include/freetype/config/compiler-macros.h: ...this new file. * include/freetype/internal/*.h, src/raster/ftraster.h: Include `compiler-macros.h' where needed.
* [build] Move mac support code to `mac-support.h'.David Turner2020-07-052-30/+50
| | | | | | | | | | | * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off mac-specific stuff to... * include/freetype/config/mac-support.h: ...this new file. * CMakeLists.txt, builds/unix/configure.raw: Remove `/undef -> #undef' string replacement; the affected code is no longer part of the `ftconfig.h' template.
* [build] Put integer type definitions into `integer-types.h'.David Turner2020-07-052-233/+246
| | | | | | | | | | | | | | | | | | | | | Refactor some of the `ftconfig.h' headers and template to move the definition of the FreeType integer types (e.g., `FT_Int16') to a common header file `freetype/config/integer-types.h'. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off integer type definition stuff to... * include/freetype/config/integer-types.h: ...this new file. * builds/unix/ftconfig.h.in: Control the definition of `FT_SIZEOF_INT' and `FT_SIZEOF_LONG' with macro `FT_USE_AUTOCONF_SIZEOF_TYPES'. If these are not defined, auto detection happens in `integer-types.h' as usual based on `INTXX_MAX' values. Otherwise the autoconf-detected values are used. * builds/unix/configure.raw (CPPFLAGS): Don't include path to `config' directory. Instead, ... (FT_CONFIG_STANDARD_LIBRARY_H): Use complete path.
* Make macros for header file names optional.David Turner2020-06-081-18/+24
| | | | | | | | | | | | | | | | | We no longer have to take care of the 8.3 file name limit; this allows us (a) to introduce longer, meaningful file names, and (b) to avoid macro names in `#include' lines altogether since some compilers (most notably Visual C++) doesn't support this properly. */*: Replace #include FOO_H with #include <freetype/foo.h> or something similar. Also update the documentation.
* Remove Jamfile files from the tree.David Turner2020-05-181-1/+1
| | | | | | | | These have not been used in a very, very long time, so better remove them. A corresponding patch will be submitted to the `freetype2-demos' repository. * src/Jamfile, src/*/Jamfile, Jamrules: Delete.
* [smooth] Turn on LCD filtering during FreeType initialization.Alexei Podtelezhnikov2020-05-121-4/+2
| | | | | | | | | * src/smooth/ftsmooth.c (ft_smooth_init): Enable LCD filtering. * include/freetype/ftlcdfil.h: Document it, remove patent warnings. * include/freetype/freetype.h (FT_Render_Mode): Updated. * include/freetype/config/ftoption.h, devel/ftoption.h [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Do not mention patents.
* [smooth] Stop using dedicated LCD modules and classes.Alexei Podtelezhnikov2020-05-111-2/+0
| | | | | | | | | | | | | | | The LCD modules were never truly independent. They mostly served as a way to disable patented LCD rendering, which is no longer necessary. The `smooth' module now handles LCD modes as well. * src/smooth/ftsmooth.c (ft_smooth_lcd_renderer_class. ft_smooth_lcdv_renderer_class): Deleted. (ft_render_smooth): Reworked from `ft_render_smooth_generic'. * src/smooth/ftsmooth.h: Remove dedicated LCD classes. * src/smooth/module.mk: Remove dedicated LCD modules. * include/freetype/config/ftmodule.h: Ditto. * builds/amiga/include/config/ftmodule.h: Ditto. * include/freetype/ftmodapi.h: Do not mention LCD modules.
* Update all copyright notices.Werner Lemberg2020-01-194-4/+4
|
* [cmake] Don't fail if brotli is missing (#56894).Avi Halachmi (:avih)2019-09-151-1/+1
| | | | | | | | | | | | | | | The libs which cmake controls are commented out at include/freetype/config/ftoption.h and cmake un-comment each enabled library, but the brotli option was not commented out, therefore `FT_CONFIG_OPTION_USE_BROTLI' remained defined even if brotli was missing/disabled/etc. Comment it such that cmake can control it, which means leaving it undefined if brotli is missing. * include/freetype/config/ftoption.h: Fix typo.
* Fix handling of `AF_CONFIG_OPTION_INDIC'.Werner Lemberg2019-09-051-1/+3
| | | | | * devel/ftoption.h, include/freetype/config/ftoption.h: `AF_CONFIG_OPTION_INDIC' needs `AF_CONFIG_OPTION_CJK'.
* Add Brotli dependency and required checks.Nikhil Ramakrishnan2019-08-271-0/+16
| | | | | | | | | | | | Brotli is required for decompressing WOFF2 font directory streams. The library is thus being added as an optional dependency for FreeType. * builds/unix/configure.raw: Add checks for `libbrotlidec'. (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBSSTATIC_CONFIG): Updated. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_BROTLI): New macro.
* More documentation updates.Werner Lemberg2019-02-231-2/+2
| | | | In particular, mark the new behaviour of `FT_LOAD_COLOR' as experimental.
* Update all copyright notices.Werner Lemberg2019-02-234-4/+4
|
* s/`....`/'....'/ for SFNT table tags in documentation.Werner Lemberg2019-02-212-12/+12
|
* Update copyright years.Werner Lemberg2019-01-224-4/+4
|
* Synchronize `ftconfig' files.Werner Lemberg2018-09-051-2/+2
|
* Typo (#54618).Werner Lemberg2018-09-041-1/+1
|
* Make `/****...' comments in public headers uniformly end on column 77.Werner Lemberg2018-09-042-55/+55
|