Commit Graph

115 Commits

Author SHA1 Message Date
Werner Lemberg 695d606ae5 Whitespace. 2022-04-01 08:50:33 +02:00
Werner Lemberg d0cfb4e1b2 Update all copyright notices. 2022-01-11 10:54:10 +01:00
Werner Lemberg 3cabd142ce Update `CHANGES` files, other minor whitespace and documentation issues. 2021-11-22 19:58:21 +01:00
Werner Lemberg 6da5f95fcf [gxvalid] Fix minor compilation warning.
* src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup): Declare
as static.
2021-11-20 09:29:09 +01:00
Werner Lemberg d31bafcb9c Fix clang warnings.
* src/gxvalid/gxvcmmn.h (GXV_SET_ERR_IF_PARANOID): Use 'do' block.
* src/gxvalid/gxvmod.c (GXV_TABLE_LOAD, GXV_TABLE_VALIDATE): Ditto.

* src/smooth/ftgrays.c (gray_convert_glyph): Add cast.

* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Remove cast.
* src/type1/t1load.c (read_binay_data): Use `FT_ULong` for `size` parameter.
(parse_subrs, parse_charstrings, parse_dict): Ditto; also add some casts.
2021-11-14 11:02:54 +01:00
Werner Lemberg b86f96bce6 * src/gxvalid.*, src/otvalid.*: Fix `-Wformat` warnings. 2021-11-08 11:44:02 +01:00
Alexei Podtelezhnikov 78f2bd0bd3 Whitespace formatting. 2021-08-22 22:32:07 -04:00
Alexei Podtelezhnikov 93715ab2c4 [gxvalid,otvalid] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/gxvalid/gxvmod.c (gxv_load_table): Do not zero out the buffer.
* src/otvalid/otvmod.c (otv_load_table): Ditto.
2021-04-22 23:07:01 -04:00
Alexei Podtelezhnikov 70fd20e67e Decorate qsort callbacks with cdecl.
* include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
Add new macro.
* src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c,
src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c,
src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update qsort callbacks.

Fixes #1026 when compiling FreeType with an unusual calling convention
while the C library qsort still expects cdecl.
2021-02-12 19:28:05 -05:00
Werner Lemberg b6e8a71266 Update all copyright notices. 2021-01-17 07:18:48 +01:00
Werner Lemberg a6adb25626 * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
This ensures good logging output, with all lines having a proper
prefix (if requested).
2020-12-05 09:43:45 +01:00
David Turner 0f35b042e0 [build] Really fix multi and C++ builds.
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'.
2020-07-07 06:51:09 +02:00
Werner Lemberg 1658685967 Remove redundant inclusion of `ft2build.h'.
* */*: Remove `#include <ft2build.h>' where possible.

* include/freetype/freetype.h: Remove cpp error about missing
inclusion of `ft2build.h'.
2020-06-13 21:15:45 +02:00
David Turner e13391333f Make macros for header file names optional.
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.
2020-06-08 13:31:55 +02:00
David Turner 4eee13404d Remove Jamfile files from the tree.
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.
2020-05-18 17:56:06 +02: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 ec439711b1 [gxvalid] Fix compiler warnings.
* src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
2018-12-12 19:59:42 +01:00
Werner Lemberg a0dd16fb3d Don't use `trace_' prefix for FT_COMPONENT arguments.
* include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
(FT_TRACE): Use `FT_TRACE_COMP'.

*/* (FT_COMPONENT): Updated.
2018-08-15 18:13:17 +02:00
Werner Lemberg 799d27b0b6 Fix clang warnings.
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
`orientation'.

* src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.

* src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
Add cast.

* src/type1/t1load.c (parse_weight_vector): Fix cast.
2018-08-04 06:39:11 +02:00
Werner Lemberg 9ac9060df0 [GSoC] src/*.*: Convert block comments to `light' style.
This monster commit was created by applying Nikhil's scripts
`docconverter.py' and `markify.py' to all C header and source files,
followed up by minor manual clean-up.

No change in functionality, of course.

I used commit f7419907bc6044b9b7057f9789866426c804ba82 from
https://github.com/nikramakrishnan/freetype-docs.git.
2018-06-03 09:08:41 +02: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 0a0c22569d Update copyright year. 2018-01-02 09:33:57 +01:00
Werner Lemberg 87ddad2007 Update or fix links to use the https protocol instead of http. 2017-12-04 20:43:30 +01:00
Alexei Podtelezhnikov 22a7f5b8af Branding fixes. 2017-09-07 22:36:02 -04:00
Werner Lemberg 9931175dcc Improve `make multi'.
* src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.

* src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.

* src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.

* src/sfnt/pngshim.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.

* src/sfnt/ttbdf.c: Avoid empty source file.
* src/sfnt/ttpost.c: Guard file with
TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
* src/sfnt/ttsbit.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS.

* src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
source file.

* src/truetype/ttsubpix.c: Guard file with
TT_USE_BYTECODE_INTERPRETER also.

* src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.

* src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
entries.
2017-03-18 07:06:49 +01:00
Alexei Podtelezhnikov 15c6e8d6c5 Typos. 2017-01-22 23:09:05 -05:00
Alexei Podtelezhnikov a32270ae0e Typos. 2017-01-19 23:01:44 -05:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 4441f7b246 Replace `foo == NULL' and `foo != NULL' with `!foo' and `foo', resp.
Other minor formatting.
2016-12-26 17:08:17 +01:00
Werner Lemberg 45cad2e5e1 More FT_ZERO usage.
* src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
s/ft_memset/FT_MEM_ZERO/.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings):
s/ft_memset/FT_ARRAY_ZERO/.

* src/raster/ftraster.c (FT_ZERO): Define.
(ft_black_new): Use it.
* src/raster/ftrend1.c (ft_raster1_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.

* src/smooth/ftgrays.c (FT_ZERO): Define.
(gray_raster_new): Use it.
* src/smooth/ftsmooth.c (ft_smooth_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
2016-09-28 19:10:52 +02:00
Werner Lemberg c95b7652d8 s/0/NULL/ for function pointers; comments, formatting. 2016-09-17 17:12:50 +02:00
Alexei Podtelezhnikov bbcb97793e Typos. 2016-04-13 00:11:52 -04:00
Alexei Podtelezhnikov e85422606d Typos. 2016-04-08 23:21:34 -04:00
Werner Lemberg 3295039107 Whitespace. 2016-02-15 12:54:40 +01:00
Werner Lemberg fc4523bd00 [gxvalid] Remove commented out code.
* src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
2016-01-21 06:20:20 +01:00
Werner Lemberg fc11af1ea2 Various minor clang fixes.
* src/autofit/afcjk.c (af_cjk_metrics_init_widths),
src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
`ch'.

* src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.

* src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.

* src/base/fthash.c (hash_num_lookup): Add cast.

* src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.

* src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
redundant code.

* src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
cast.

* src/type1/t1load.c (parse_subrs): Fix type of `count'.
2016-01-19 19:15:54 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 37412ff9f4 Don't use macro names that contain `__' [1/2].
Such macro names are reserved for both C and C++.

*/*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
2016-01-12 21:37:13 +01:00
Werner Lemberg 4188deacf3 Comments. 2015-10-30 08:07:56 +01:00
Werner Lemberg 31d97df99f Make Jam support work again.
This is just very basic stuff and just a little bit tested on
GNU/Linux only.  I won't delve into this since I'm not a Jam user.

* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
(DEFINES): Replace with...
(CCFLAGS): ... this.

* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
already handled in the top-level Jamfile.

* src/autofit/Jamfile (DEFINES): Replace with...
(CCFLAGS): ... this.
(_sources): Add missing files.

* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
longer contains macro header definitions.

* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
src/truetype/Jamfile (_sources): Add missing files.
2015-06-21 19:12:12 +02:00
Werner Lemberg 772a5e5ddd Update links to Apple's TrueType specification. 2015-03-20 09:40:10 +01:00
Werner Lemberg 3e58779675 Minor copyright and e-mail address issues. 2015-03-11 08:48:15 +01:00
Werner Lemberg 17b6291d26 [gxvalid] Signedness fixes.
* src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
2015-02-25 07:56:11 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg f796cf6c6b Normalize copyright notice format. 2015-01-17 20:11:10 +01:00
Werner Lemberg 36d03c9f58 Fix Savannah bug #43976.
Assure that FreeType's internal include directories are found before
`CPPFLAGS' (which might be set by the user in the environment), and
`CPPFLAGS' before `CFLAGS'.

* builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
(FT_COMPILE): Make this a special variable for compiling only the
files handled in `freetype.mk'.
(.c.$O): Removed, unused.

* src/*/rules.mk (*_COMPILE): Fix order of include directories.
2015-01-12 11:26:30 +01:00
suzuki toshiya 9bd1e55850 [gxvalid] Fix a naming convention conflicting with ftvalid.
See previous changeset for otvalid.

* src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
`valid' by `gxvalid'.
* src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
it is typed as GXV_Validator.
2014-12-10 00:59:09 +09:00
suzuki toshiya 2b59282b2d [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
Original patch is designed by Werner Lemberg.  Extra part
for otvalid and gxvalid are added by suzuki toshiya, see
discussion:
http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html

* include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
* src/gxvalid/gxvcommn.h: Ditto.
* src/otvalid/otvcommn.h: Ditto.
2014-12-10 00:27:41 +09:00