Commit Graph

45 Commits

Author SHA1 Message Date
Werner Lemberg d0cfb4e1b2 Update all copyright notices. 2022-01-11 10:54:10 +01:00
Alexei Podtelezhnikov 6190360967 Minor. 2021-09-20 22:18:29 -04:00
Alexei Podtelezhnikov 612925ff22 s/0/NULL/ where appropriate. 2021-09-01 21:37:21 -04:00
Alexei Podtelezhnikov 0bd5d95d66 * src/base/ftobjs.c (Mac_Read_POST_Resource): s/FT_ALLOC/FT_QALLOC/.
* builds/mac/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto.
2021-04-23 22:04:05 -04:00
Werner Lemberg b6e8a71266 Update all copyright notices. 2021-01-17 07:18:48 +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
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
Young Xiao c94162a220 * builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
Reported as bug #54515, duplicate of #43540.
2018-08-16 08:25:47 -04:00
Werner Lemberg 0a0c22569d Update copyright year. 2018-01-02 09:33:57 +01:00
Alexei Podtelezhnikov 22a7f5b8af Branding fixes. 2017-09-07 22:36:02 -04:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 6949797d60 More code formatting. 2016-12-17 21:05:54 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg f34f192535 * src/*: Add checks for parameters of API functions where missing.
`API functions' are functions tagged with `FT_EXPORT_DEF'.

Besides trivial fixes, the following changes are included, too.

* src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
error code if no service is available.

* src/base/ftinit.c (FT_Done_FreeType): Change return value for
invalid `library' parameter to `Invalid_Library_Handle'.

* src/base/ftobjs.c (FT_New_Size): Change return value for invalid
`asize' parameter to `Invalid_Argument'.

* src/base/ftoutln.c (FT_Outline_Copy): Change return value for
invalid `source' and `target' parameters to `Invalid_Outline'.
(FT_Outline_Done_Internal): Change return value for invalid
`outline' parameter to `Invalid_Outline'.
2014-11-26 21:59:21 +01:00
Werner Lemberg e8ed2d621e Another round of cppcheck nitpicks.
The call was (from the top-level of the FreeType tree):

  cppcheck --force \
           --enable=all \
           -I /usr/include \
           -I /usr/local/include \
           -I /usr/lib/gcc/i586-suse-linux/4.7/include \
           -I include \
           -I include/freetype \
           -I include/freetype/config \
           -I include/freetype/internal \
           -DFT2_BUILD_LIBRARY \
           . &> cppcheck.log

using cppcheck git commit f7e93f99.

Note that cppcheck still can't handle `#include FOO' (with `FOO' a
macro).

*/* Improve variable scopes.
*/* Remove redundant initializations which get overwritten.

* src/gxvalid/*: Comment out redundant code or guard it with
FT_DEBUG_LEVEL_TRACE.
2013-08-01 12:20:20 +02:00
Werner Lemberg dc624ca4dc Apply fixes for cppcheck nitpicks.
http://cppcheck.sourceforge.net/

Note that the current version heavily chokes on FreeType, delivering
even wrong results.  I will report those issues to the cppcheck team
so that a newer version gives improved results hopefully.

*/* Improve variable scopes.
*/* Remove redundant initializations which get overwritten.

* src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable):
Remove unused variable.

* src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.

* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
Remove functionless code.

* src/tools/ftrandom.c (main): Fix memory leak.
2013-06-04 10:30:48 +02:00
Werner Lemberg fd66469eba Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
* builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
2013-05-17 17:40:27 +02:00
suzuki toshiya 714ee56ab1 [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
was a configurable macro to disable Carbon-dependent code.  Because
now configure script sets DARWIN_NO_CARBON by default and disables
Darwin & Carbon-dependent codes, these macros can be unified.
FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
(defined by default) is removed, because DARWIN_NO_CARBON violates
FT_XXX naming convention of public macros, and a macro configured by
default is not portable for the building without configure (e.g.
make devel).

* builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
old Mac font support is requested and Carbon is available.
* builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
for Mac OS X without Carbon (e.g.  Mac OS X 10.4 for ppc64) is
requested.
* include/freetype/config/ftconfig.in: Ditto.
* builds/vms/ftconfig.h: Ditto.

* src/base/ftbase.h: Remove DARWIN_NO_CARBON.
* src/base/ftbase.c: Ditto.
* src/base/ftobjs.c: Ditto.
* src/base/ftrfork.c: Ditto.

* src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
(same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
* builds/mac/ftmac.c: Ditto.

* builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
* builds/mac/FreeType.m68k_far.make.txt: Ditto.
* builds/mac/FreeType.ppc_classic.make.txt: Ditto.
* builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
2011-12-02 21:14:58 +09:00
Suzuki, Toshiya (鈴木俊哉) 96d87bed0e {src/base,builds/mac}/ftobjs.c: Include FT_TRUETYPE_TAGS_H for multi build 2008-10-05 03:08:10 +00:00
Suzuki, Toshiya (鈴木俊哉) 21bd516592 Introduce macros for some MacOS-specific resource tags 2008-10-04 18:10:28 +00:00
Suzuki, Toshiya (鈴木俊哉) 1137d04f85 * New function `open_face_PS_from_sfnt_stream' to check and open a Type1 PS or CID-keyed font in an sfnt stream. 2008-10-04 07:11:58 +00:00
Suzuki, Toshiya (鈴木俊哉) 9e2b9900dc * Remove duplicated functions from builds/mac/ftmac.c. Now MPW builds builds/mac/ftmac.c as a part of ftbase.c 2008-10-03 11:52:22 +00:00
Suzuki, Toshiya (鈴木俊哉) 3afbee82fe * ftmac.c: Import sfnt-wrapped Type1/CID font support 2008-09-19 17:46:01 +00:00
Werner Lemberg 77f7358533 Formatting. 2008-08-19 04:53:02 +00:00
Suzuki, Toshiya (鈴木俊哉) fdc2d7618a * src/base/ftmac.c: Add a fallback for the case that HAVE_TYPE_RESOURCE_INDEX is not set by configure 2008-08-18 06:02:07 +00:00
Werner Lemberg 9b9d3349b2 minor improvements, copyright years 2008-02-21 23:22:06 +00:00
Suzuki, Toshiya (鈴木俊哉) 6cb2faa845 * src/base/ftmac.c: Fix a bug of PostScript font name synthesis in parse_fond(). 2008-02-21 18:46:07 +00:00
Suzuki, Toshiya (鈴木俊哉) d2c55ab0e4 fix for inexistent sfnt ID in broken FOND 2008-02-15 09:12:59 +00:00
Suzuki, Toshiya (鈴木俊哉) 75696860ea Formatting. 2008-01-04 01:43:23 +00:00
Suzuki, Toshiya (鈴木俊哉) 44b5e57781 Mac OS X Carbon tests in configure.raw are improved and builds/mac/ftmac.c is updated to sync to src/base/ftmac.c 2007-12-06 07:47:25 +00:00
Suzuki, Toshiya (鈴木俊哉) 2be3f472dd * src/base/ftmac.c: Use more abstract data type instead of `short\' 2007-08-29 06:08:59 +00:00
Suzuki, Toshiya (鈴木俊哉) 7893501c3e * fix compiler warnings of src/base/ftmac.c, drop unnecessary part for Mac OS X. 2007-06-19 03:27:05 +00:00
Werner Lemberg de5e686661 formatting 2007-02-25 21:06:43 +00:00
Suzuki, Toshiya (鈴木俊哉) b68e025c1b * Fix memory leak in ftmac.c, patch by Jjgod Jiang 2007-02-20 02:37:36 +00:00
Werner Lemberg 406d25f379 more formatting and copyright years 2007-02-12 22:01:18 +00:00
David Turner c0f9c4aadd introduce ft_mem_dup, ft_mem_strdup and ft_mem_strcpyn, and the corresponding
macros to use them (e.g. FT_STRDUP, FT_DUP and FT_STRCPYN)

modify the code to use them instead of raw mallocs/strcpy
2007-02-12 14:55:03 +00:00
Werner Lemberg dcbb708e7a formatting, copyright years 2007-02-08 08:54:09 +00:00
Suzuki, Toshiya (鈴木俊哉) f223df6e79 * Add __attribute__((deprecated)) to functions whose interface using non ANSI data types 2007-02-05 04:07:46 +00:00
Suzuki, Toshiya (鈴木俊哉) 4827e9bd2c * Add FT_GetFilePath_From_Mac_ATS_Name as replacement for FT_GetFile_From_Mac_ATS_Name 2007-02-05 03:28:29 +00:00
Suzuki, Toshiya (鈴木俊哉) 027357f1c8 * Check ANSI compatibility of Mac OS X system header 2007-02-05 02:50:45 +00:00
Suzuki, Toshiya (鈴木俊哉) 21fd256d20 * Backup src/base/ftmac.c to builds/mac/ftmac.c for legacy MacOS 2006-12-15 15:09:44 +00:00