Commit Graph

89 Commits

Author SHA1 Message Date
Werner Lemberg d0cfb4e1b2 Update all copyright notices. 2022-01-11 10:54:10 +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
Werner Lemberg b6e8a71266 Update all copyright notices. 2021-01-17 07:18:48 +01:00
Werner Lemberg 272ae5ee2a * src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`. 2020-12-07 10:29:24 +01: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 04ebb2a000 * src/otvalid/otvcommon.c (otv_Coverage_get_last): Guard `count'.
Problem reported by Marc Schönefeld <marc.schoenefeld@gmx.org>.
2019-09-17 19:46:59 +02: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 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 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 6d403d089d Fix handling of ValueRecords.
For GPOS pair positioning format 1 the description of ValueRecords
in the OpenType specification (1.8.2, from today) is wrong – the
offset has to be taken from the parent structure; in this case the
`PairSet' table.

* src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
(otv_PairPos_validate): Adjust.
2017-09-24 09:15:11 +02:00
Werner Lemberg 0da0faf0fb [otvalid] Handle `GSUB' and `GPOS' v1.1 tables.
* src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c
(otv_GPOS_validate): Implement it.
2017-09-24 09:15:11 +02:00
Werner Lemberg 2b79d25f22 [otvalid] Update common table handling to OpenType 1.8.2.
* src/otvalid/otvcommn.c (otv_Device_validate): Handle
VariationIndex subtable.
(otv_Lookup_validate): Handle MarkFilteringSet.
2017-09-24 09:15:11 +02:00
Werner Lemberg b0103677be [otvalid] Handle `GDEF' v1.2 and v1.3 tables.
No validation of variation stuff yet.

* src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function.
(otv_GDEF_validate): Implement it.
2017-09-23 00:40:28 +02:00
Werner Lemberg 6756a18578 [otvalid] Handle `BASE' v1.1 table.
No validation of variation stuff yet.

* src/otvalid/otvbase.c (otv_BASE_validate): Implement it.
2017-09-23 00:36:49 +02:00
Werner Lemberg 3645982ac2 [otvalid] Macros for 32bit offset support.
* src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32,
OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros.
2017-09-22 07:53:25 +02:00
Werner Lemberg 21c235ecf1 [otvalid] Whitespace. 2017-09-22 07:28:25 +02: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
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg f80c4473b6 Replace `++foo' and `--foo' with `foo++' and `foo--', resp. 2016-12-26 23:57:45 +01:00
Werner Lemberg c95b7652d8 s/0/NULL/ for function pointers; comments, formatting. 2016-09-17 17:12:50 +02:00
Werner Lemberg 3295039107 Whitespace. 2016-02-15 12:54:40 +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 d25ec16672 [otvalid] Signedness fixes.
* src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
Apply.
2015-02-25 09:19:59 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +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 51abdf6ffa [otvalid] Fix a naming convention conflicting with ftvalid.
Some prototypes in ftvalid.h use `valid' for the variables
typed as FT_Validator.  Their implementations in src/base/
ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.

Some macros in otvcommn.h assume the exist of the variable
`valid' typed as OTV_Validator in the caller.

Mixing these two conventions cause invalid pointer conversion
and unexpected SEGV in longjmp.  To prevent it, all variables
typed as OTV_Validator are renamed to `otvalid'.

* src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
* src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
if it is typed as OTV_Validator.
2014-12-10 00:46:55 +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
Werner Lemberg 89f5064765 */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
FT_Err_XXX and friends are no longer directly used in the source
code.
2013-03-14 17:50:49 +01:00
Werner Lemberg e3c9301581 */*: Use FT_Err_Ok only.
This is a purely mechanical conversion.
2013-03-14 11:21:17 +01:00
Werner Lemberg 059bc335ce */*: Use `FT_THROW'.
This is essentially a mechanical conversion, adding inclusion of
`FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
stand-alone compiling modes of the rasterizer modules.

To convert the remaining occurrences of FT_Err_XXX and friends it is
necessary to rewrite the code.  Note, however, that it doesn't harm
if some cases are not handled since FT_THROW is a no-op.
2013-03-14 10:27:35 +01:00
Werner Lemberg dbc6e3f192 Remove `FT_KEEP_ERR_PREFIX'.
The idea is to always have FT_ERR_PREFIX available internally.

* include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard
undefinition of FT_ERR_PREFIX

* src/gxvalid/gxverror.h, src/otvalid/otverror.h,
src/sfnt/sferrors.h: Updated.
2013-03-12 11:42:20 +01:00
Vinnie Falco 26dfeb6d63 Prepare source code for amalgamation.
* src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c,
src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h,
src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c,
src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h,
src\psaux\psauxerr.h, src\pshinter\pshnterr.h,
src\psnames\psnamerr.h, src\raster\rasterrs.h, src\sfnt\sferrors.h,
src\smooth\ftsmerrs.h, src\truetype\tterrors.h,
src\type1\t1errors.h, src\type42\t42error.h, src\winfonts\fnterrs.h:
Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
2012-03-08 06:04:03 +01:00
suzuki toshiya 1749d8bc6a Remove trailing spaces. 2012-01-17 02:00:24 +09:00
Werner Lemberg c52f44d4fd Whitespace. 2011-11-30 10:46:53 +01:00
Werner Lemberg 370aea802c Formatting. 2010-06-08 08:37:11 +02:00
suzuki toshiya 52170ac0ce otvalid: Truncate the glyph index to 16-bit. 2009-08-01 00:32:11 +09:00
suzuki toshiya 88c95bab74 otvalid: Count the table size on memory by ptrdiff_t. 2009-08-01 00:30:13 +09:00
suzuki toshiya 90c7efc8f2 otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset. 2009-08-01 00:30:13 +09:00
Werner Lemberg 858abbedc0 For warning messages, replace FT_ERROR with FT_TRACE0.
FT_ERROR is now used only if a function produces a non-zero `error'
value.

Formatting, improving and harmonizing debug strings.
2009-06-26 06:15:41 +02:00