Commit Graph

42 Commits

Author SHA1 Message Date
Werner Lemberg 65f8523706 Update all copyright notices. 2023-01-17 09:18:25 +01:00
Moazin Khatti 0bf49bd229 Add 'svg' module for OT-SVG rendering.
* 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.
2022-01-20 16:45:18 +00:00
Werner Lemberg d0cfb4e1b2 Update all copyright notices. 2022-01-11 10:54:10 +01:00
Alexei Podtelezhnikov 81852fbccc Prioritize the anti-aliasing renderer module.
* modules.cfg: Reorder the renderers.
* include/freetype/config/ftmodule.h: Ditto.
2021-05-18 22:18:17 -04:00
Werner Lemberg b6e8a71266 Update all copyright notices. 2021-01-17 07:18:48 +01:00
Anuj Verma 879ca87f0b [sdf] Add build infrastructure.
* src/sdf/module.mk, src/sfd/rules.mk: New files.

* src/sdf/ftsdf.h (ft_sdf_raster): New forward declaration.

* include/freetype/ftmoderr.h (FT_MODERRDEF): Add error definition
for the 'sdf' module.

* include/freetype/internal/fttrace.h (FT_TRACE_DEF): Add trace
definition for the `sdf' module.

* modules.cfg (RASTER_MODULES): Add the `sdf' module to the list of
rasterizers.
2020-12-24 07:23:48 +01:00
Werner Lemberg e5038be704 Update all copyright notices. 2020-01-19 17:05:19 +01:00
Werner Lemberg 7585997024 Update all copyright notices. 2019-02-23 10:07:09 +01:00
Werner Lemberg f686ad46a3 Update copyright years. 2019-01-22 20:31:44 +01:00
Werner Lemberg 9514959241 Remove FT_CONFIG_OPTION_PIC and related code.
*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
preprocessor symbol.

*/*: Replace `XXX_GET' macros (which could be either a function in
PIC mode or an array in non-PIC mode) with `xxx' arrays.

* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
Removed.
2018-05-02 20:27:48 +02:00
Werner Lemberg ccec889229 Minor: Update `CHANGES' and improve documentation in `modules.cfg'. 2018-03-08 06:09:17 +01:00
Werner Lemberg 733a21bdbc Make `ftlcdfil.c' part of the `base' module.
`ftobjs.c' needs `ft_lcd_padding'.

Problem reported by duhuanpeng <548708880@qq.com>.

* modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'.

* src/base/ftbase.c: Include `ftlcdfil.c'.
* src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'.
* src/base/Jamfile (_sources): Adjusted.

* docs/INSTALL.ANY: Updated.
2018-03-05 23:37:17 +01:00
Werner Lemberg f4a3531655 Make `ftfntfmt.c' part of the `base' module.
`ftobjs.c' needs `FT_Get_Font_Format'.

Problem reported by duhuanpeng <548708880@qq.com>.

* modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'.

* src/base/ftbase.c: Include `ftfntfmt.c'.
* src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'.
* src/base/Jamfile (_sources): Adjusted.

* docs/INSTALL.ANY: Updated.
2018-03-05 20:45:12 +01:00
Werner Lemberg 0a0c22569d Update copyright year. 2018-01-02 09:33:57 +01:00
Ewald Hew 94f6d57a4c [cff] Fix segfault on missing `psaux' (#52218)
* src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.

* modules.cfg: Update dependency list.
2017-10-16 19:17:30 +08:00
Alexei Podtelezhnikov 983fb0df5a Typos. 2017-01-24 23:56:59 -05:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg a6ee6fe67b s/PIC/FT_CONFIG_OPTION_PIC/ to avoid confusion. 2016-08-28 18:51:50 +02:00
Werner Lemberg 3ec64654c4 Explain how to build a PIC-enabled version of FreeType. 2016-08-28 11:02:00 +02:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 392cf22f8a Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel

  http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html

Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.

* include/freetype2: Renamed to...
* include/freetype: This.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.

* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-26 06:48:00 +02:00
Werner Lemberg 8502c98b15 Fix Savannah bug #45097.
We no longer `pollute' the namespace of possible header file names;
instead we move `ft2build.h' up by one level so that it gets
installed in the default include directory (e.g.,
/usr/local/include).  After this commit, only `ft2build.h' stays in
the compiler's include path.

No visible changes for the user who follows the standard FreeType
header inclusion rules.

* include/*: Move to ...
* include/freetype2/*: This directory, except `ft2build.h'.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/install.mk (install, uninstall),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
Emit -I directory only if it is not `/usr/include'.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-22 06:35:23 +02:00
Werner Lemberg f4d1c11faa Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
* include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.

* docs/CHANGES: Updated.
2015-03-11 08:54:08 +01:00
Werner Lemberg 0633995b55 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
builds/mac/FreeType.m68k_far.make.txt,
builds/mac/FreeType.ppc_carbon.make.txt,
builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2008-ce/freetype.vcproj,
builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/freetype.vcxproj.filters,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
src/base/ftfntfmt.c, vms_make.com: Updated.
2015-03-11 08:45:00 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg fae3820764 Simplify header file hierarchy.
This large patch changes the header file directory layout from
`include/freetype/...' to `include/...', effectively removing one
level.  Since the file `ft2build.h' is also located in `include'
(and it stays there even after installation), all FreeType header
files are now in a single directory.

Applications that use (a) `freetype-config' or FreeType's
`pkg-config' file to get the include directory for the compiler, and
(b) the documented way for header inclusion like

  #include <ft2build.h>
  #include FT_FREETYPE_H
  ...

don't need any change to the source code.

* include/freetype/*: Move up to...
* include/*: ... this directory.

* builds/amiga/include/freetype/*: Move up to...
* builds/amiga/include/*: ... this directory.

*/*: Essentially do `s@/freetype/@/@' where appropriate.

* CMakeList.txt: Simplify.
* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
`--cflags', return a single directory.
* builds/unix/install.mk (install): No longer try to remove `cache'
and `internal' subdirectories; instead, remove the `freetype'
subdirectory.
2013-11-13 08:55:46 +01:00
Werner Lemberg 930e9bf8f4 Add new error code FT_Err_Missing_Module.
Previously, FreeType misleadingly returned
FT_Err_Unknown_File_Format if a module was missing (or a test was
missing completely).

* include/freetype/fterrdef.h (FT_Err_Missing_Module): Define.

* src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
(cid_face_init), src/sfnt/sfobjs.c (sfnt_init_face),
src/truetype/ttobjs.c (tt_face_init), src/type1/t1objs.c
(T1_Face_Init), src/type42/t42objs.c (T42_Face_Init,
T42_Driver_Init): Updated.

* src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c
(T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now
redundant test for `psaux'.
2011-11-26 13:38:26 +01:00
Joel Klinghed ed913c2151 Add bzip2 compression support to handle *.pcf.bz2 files.
* builds/unix/configure.raw: Test for libbz2 library.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_BZIP2): Define.
* include/freetype/config/ftheader.h (FT_BZIP2_H): Define.

* include/freetype/ftbzip2.h: New file.

* src/bzip2/*: New files.

* src/pcf/pcf.h: s/gzip_/comp_/.
* src/pcf/pcfdrvr.c: Include FT_BZIP2_H.
s/gzip_/comp_/.
(PCF_Face_Init): Handle bzip2 compressed files.

* docs/formats.txt, modules.cfg: Updated.
2010-12-31 16:59:33 +01:00
Werner Lemberg 5184ed6d53 Move FT_Get_FSType_Flags to a separate file.
Problem reported by Mickey Gabel <mickey@monfort.co.il>.

* src/base/ftobjs.c (FT_Get_FSType_Flags): Move to...
* src/base/ftfstype.c: This new file.

* modules.cfg (BASE_EXTENSION): Add ftfstype.c.

* docs/INSTALL.ANY: Updated.

* builds/mac/*.txt, builds/amiga/*makefile*,
builds/win32/{visualc,visualce}/freetype.*, builds/symbian/*:
Updated.
2009-01-22 10:13:59 +00:00
Werner Lemberg ef915c36f4 * docs/CHANGES: Updated.
Add new service for getting the ROS from a CID font.

* include/freetype/config/ftheader.h (FT_CID_H): New macro.
* include/freetype/ftcid.h: New file.

* include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
* include/freetype/internal/services/svcid.h: New file.

* src/base/ftcid.c: New file.

* src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
(cff_get_ros): New function.
(cff_service_cid_info): New service structure.
(cff_services): Register it.

* src/cff/cffload.c (cff_font_done): Free registry and ordering.

* src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.

* modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
2007-07-16 20:46:05 +00:00
Werner Lemberg f6c120f826 * docs/CHANGES: Document FT_Face_CheckTrueTypePatents).
Formatting, reformulations.
2007-06-11 04:55:58 +00:00
David Turner 84c6f88117 * include/freetype/config/ftoption.h: clarify documentation regarding
unpatented hinting

	* include/freetype/freetype.h, src/base/ftpatent.c, src/truetype/ttdriver.c,
	include/freetype/internal/services/svttglyf.h, modules.cfg,:
	include/freetype/internal/ftserv.h,:
	Fonts without a cmap must be handled correctly by FreeType (anything
	Adding the FT_Face_CheckTrueTypePatents API to FT_FREETYPE_H, it is
	implemented by the optional src/base/ftpatent.c
2007-06-10 20:51:04 +00:00
Werner Lemberg 53935939df * Version 2.3.1 released.
=========================


Tag sources with `VER-2-3-1-FINAL'.

* builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj: s/230/231/.
* builds/win32/visualc/index.html: s/221/231/.

* vms_make.com: Add `ftgasp'.
2007-01-31 08:53:02 +00:00
Werner Lemberg 23df31adcc * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix compilation
with C++ compiler.

* src/autofit/afhints.c (af_glyph_hints_dump_segments,
af_glyph_hints_dump_edges): Ditto.

* src/base/rules.mk (BASE_SRC): Remove ftgasp.c (it's already in
`modules.cfg').

* src/sfnt/ttsbit0.h: Remove.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c.
2007-01-13 08:45:00 +00:00
Werner Lemberg cc7f12a429 formatting, copyright years and messages, doc polishing 2007-01-09 10:37:36 +00:00
David Turner f48b60ed59 * include/freetype/ftgasp.h, src/base/ftgasp.c: adding a
new API FT_Get_Gasp to return entries of the GASP table
        corresponding to a given character pixel size.

        * src/sfnt/ttload.c: add version check for the GASP table,
        in order to be better future-proof

        * include/freetype/config/ftheader.h: add definition of
        FT_GASP_H, corresponding to <freetype/ftgasp.h>

        * src/base/rules.mk, src/base/Jamfile, modules.cfg,
        builds/win32/visualc/freetype.dsp,
        builds/win32/visualc/freetype.vcproj: Adding src/base/ftgasp.c
        to the default build
2007-01-08 15:15:32 +00:00
Werner Lemberg 9884faed9d Typo in comment. 2006-09-29 22:13:21 +00:00
David Turner 87e4b339a3 * modules.cfg: adding ftlcdfil.c to the list of default base
extensions
2006-09-27 08:45:49 +00:00
Suzuki, Toshiya (鈴木俊哉) f1e96066a6 * modules.cfg: compile ftgxval.c by default 2006-08-15 17:02:47 +00:00
Werner Lemberg 5edafed12a Clean-ups, copyright years, formatting. 2006-02-22 08:23:35 +00:00
Wu, Chia-I (吳佳一) facd9af542 * modules.cfg: Compile in ftotval.c and ftxf86.c by default for ABI
compatibility.

* src/sfnt/sfobjs.c (sfnt_done_face): Fix a memory leak.

* src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned,
tt_sbit_decoder_load_byte_aligned) [FT_OPTIMIZE_MEMORY]: Fix sbit
loading. (only tested with bit aligned sbit with x_pos == 0)

* src/truetype/ttpload.c (tt_face_load_hdmx,
tt_face_get_device_metrics) [FT_OPTIMIZE_MEMORY]: hdmx is not actually
used.
2006-02-22 07:59:35 +00:00
Werner Lemberg 59939244ad Implement new, simplified module selection. With GNU make it is now
sufficient to modify a single file, `modules.cfg', to control the
inclusion of modules and base extension files.

This change also fixes the creation of ftmodule.h; it now depends on
`modules.cfg' and thus is rebuilt only if necessary.

Finally, a version of `ftoption.h' in OBJ_DIR is preferred over the
default location.

* modules.cfg: New file.

* builds/freetype.mk: Don't include `modules.mk'.
Include all `rules.mk' files as specified in `modules.cfg'.
(FTOPTION_FLAG, FTOPTION_H): New variables.
(FT_CFLAGS): Add macro definition for FT_CONFIG_MODULES_H.
Add FTOPTION_FLAG.
($(FT_INIT_OBJ)): Don't use FT_MODULE_LIST.
(CONFIG_H): Add FTMODULE_H and FTOPTION_H.
(INCLUDES): Add DEVEL_DIR.
(INCLUDE_FLAGS, FTSYS_SRC, FTSYS_OBJ, FTDEBUG_SRC, FTDEBUG_OBJ,
OBJ_M, OBJ_S): Use `:=', not `='.
(remove_ftmodule_h): New phony target to delete `ftmodule.h'.
(distclean): Add remove_ftmodule_h.

* builds/modules.mk: (MODULE_LIST): Removed.
(make_module_list, clean_module_list): Replace targets
with...
(FTMODULE_H_INIT, FTMODULE_H_CREATE, FTMODULE_H_DONE): New
variables.  Reason for the change is that it is not possible to have
a phony prerequisite which is run only if the target file must be
rebuilt (phony prerequisites act like subroutines and are *always*
executed).  We only want to rebuild `ftmodule.h' if `module.cfg' is
changed.
Update all callers.
($FTMODULE_H)): Rule to create `ftmodule.h', depending on
`modules.cfg'.

* builds/toplevel.mk: Rewrite and simplify module handling.
(MODULES_CFG, FTMODULE_H): New variables.
Include MODULES_CFG.
(MODULES): New variable to include all `module.mk' and `rules.mk'
files.  We no longer use make's `wildcard' function for this.

* Makefile (USE_MODULES): Remove.  Update all users.
(OBJ_DIR): Define it here.

* src/*/module.mk: Change

    make_module_list: foo
    foo: ...

to

    FTMODULE_H_COMMANDS += FOO
    define FOO
    ...
    endef

in all files.  `FTMODULE_H_COMMANDS' is used in `FTMODULE_H_CREATE'.

* src/base/rules.mk (BASE_EXT_SRC): Use BASE_EXTENSIONS.

* builds/unix/detect.mk (setup): Always execute `configure' script.
(have_mk): Rename to...
(have_Makefile): This.
Don't use `strip' function.

* builds/unix/unix.mk: Include `install.mk' only if BUILD_PROJECT is
defined.
(have_mk): Don't use `strip' function.
Test for unix-def.mk in OBJ_DIR, not BUILD_DIR (and invert the test
accordingly).

* builds/unix/install.mk (install, uninstall): Handle `ftmodule.h'.

* builds/os2/os2-dev.mk, builds/unix/unix-dev.mk,
builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Don't define
BUILD_DIR but DEVEL_DIR for development header files.

* builds/ansi/ansi-def.mk (TOP_DIR, OBJ_DIR),
builds/beos/beos-def.mk (TOP_DIR, OBJ_DIR), builds/unix/unix-def.in
(TOP_DIR, OBJ_DIR): Removed.  Defined elsewhere.

* builds/dos/dos-def.mk (OBJ_DIR), builds/os2/os2-def.mk (OBJ_DIR),
builds/win32/win32-def.mk (OBJ_DIR): Removed.  Defined elsewhere.

* builds/unix/unixddef.mk: Don't define BUILD_DIR but DEVEL_DIR for
development header files.
Don't define PLATFORM.

* configure: Copy `modules.cfg' to builddir if builddir != srcdir.
Update snippet taken from autoconf's m4sh.m4 to current CVS version.
Be more verbose.

* include/freetype/config/ftmodule.h: Add comments -- this file is
no longer used if FreeType is built with GNU make.

* docs/CHANGES, docs/CUSTOMIZE, docs/INSTALL, docs/INSTALL.ANY,
docs/INSTALL.GNU, docs/INSTALL.UNX: Document new build mechanism.
Other minor updates.

* modules.txt: Removed.  Contents included in `modules.cfg'.


* include/freetype/internal/ftmemory.h (FT_QAlloc_Debug,
FT_Free_Debug) [FT_STRICT_ALIASING]: Fix typos.

* src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug,
FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug)
[FT_STRICT_ALIASING]: Implement.
2006-01-31 20:17:42 +00:00