From a4f3e858ae70570971b91c0d8093a1de4562c2b4 Mon Sep 17 00:00:00 2001 From: Anurag Thakur Date: Fri, 25 Aug 2023 21:36:12 +0200 Subject: [PATCH 001/191] docs/freetype-web.txt: New file. --- docs/freetype-web.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/freetype-web.txt diff --git a/docs/freetype-web.txt b/docs/freetype-web.txt new file mode 100644 index 000000000..03058fae1 --- /dev/null +++ b/docs/freetype-web.txt @@ -0,0 +1,42 @@ +How to update the FreeType web pages +------------------------------------ + +The 'freetype.org' website is hosted via the 'freetype-web' repo +located at + + https://gitlab.com/freetype/freetype-web , + +which in turn is a mirror from the master 'freetype-web' repository +located at + + https://gitlab.freedesktop.org/freetype/freetype-web . + +Due to Cloudflare caching, changes take time to appear on +'freetype.org', so visit + + https://freetype.gitlab.io/freetype-web + +for instant feedback. + +All the commits should *only* be done to the 'freetype-web' repo at + + https://gitlab.freedesktop.org/freetype/freetype-web + +When a commit is done to this repo, the CI pipeline runs and the +website is deployed via gitlab pages at + + https://freetype.pages.freedesktop.org/freetype-web . + +The pull mirror automatically updates the repository in 'gitlab.com', +and the CI pipeline deploys the website at: + + https://freetype.gitlab.io/freetype-web + +Since the 'freetype.org' website uses Cloudflare caching, it will take +a while for the changes to show up in 'freetype.org'. + +If you have access to the Cloudflare dashbouard you can purge the +cache from there; this will cause the cache to be fetched again +resulting in the website being updated instantly. + +--- end of freetype-web.txt --- From 4a0c5639f7d6ab8b36e0f3989c76d09b2604e5b6 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 25 Aug 2023 21:36:39 +0200 Subject: [PATCH 002/191] docs/release: Minor fixes. --- docs/release | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/release b/docs/release index c296efcc1..fa0ea486a 100644 --- a/docs/release +++ b/docs/release @@ -5,7 +5,7 @@ How to prepare a new release `FREETYPE_MINOR`, and `FREETYPE_PATCH`. . Update version numbers in all files where necessary (for example, do - a grep for both '2.10.4' and '2104' for release 2.10.4). + a grep for both '2.13.2' and '2132' for release 2.13.2). . builds/unix/configure.raw: Update `version_info`. @@ -91,13 +91,14 @@ How to prepare a new release zip! . Run the following script (with updated `$VERSION`, `$SAVANNAH_USER`, - and `$SOURCEFORGE_USER` variables) to sign and upload the bundles to - both Savannah and SourceForge. The signing code has been taken from - the `gnupload` script (part of the 'automake' bundle). + `$SOURCEFORGE_USER`, and `GPG_KEY_ID` variables) to sign and upload + the bundles to both Savannah and SourceForge. The signing code has + been taken from the `gnupload` script (part of the 'automake' + bundle). #!/bin/sh - VERSION=2.12.0 + VERSION=2.13.2 SAVANNAH_USER=wl SOURCEFORGE_USER=wlemb GPG_KEY_ID=BE6C3AAC63AD8E3F @@ -183,7 +184,7 @@ How to prepare a new release #!/bin/sh - VERSION=2.10.4 + VERSION=2.13.2 SOURCEFORGE_USER=wlemb ##################################################################### From 2d9fce53d4ce89f36075168282fcdd7289e082f9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 27 Aug 2023 07:56:38 +0200 Subject: [PATCH 003/191] [gzip] Update sources to zlib 1.13. --- src/gzip/README.freetype | 3 +- src/gzip/adler32.c | 34 +-- src/gzip/crc32.c | 258 +++++++------------ src/gzip/ftzconf.h | 8 +- src/gzip/gzguts.h | 23 +- src/gzip/inffast.c | 5 +- src/gzip/inffast.h | 2 +- src/gzip/inflate.c | 131 +++------- src/gzip/inflate.h | 2 +- src/gzip/inftrees.c | 17 +- src/gzip/inftrees.h | 8 +- src/gzip/patches/freetype-zlib.diff | 248 +++++++++--------- src/gzip/zlib.h | 385 ++++++++++++++-------------- src/gzip/zutil.c | 61 ++--- src/gzip/zutil.h | 22 +- 15 files changed, 493 insertions(+), 714 deletions(-) diff --git a/src/gzip/README.freetype b/src/gzip/README.freetype index 76298b06b..29304308f 100644 --- a/src/gzip/README.freetype +++ b/src/gzip/README.freetype @@ -1,7 +1,7 @@ Name: zlib Short Name: zlib URL: http://zlib.net/ -Version: 1.2.13 +Version: 1.3 License: see `zlib.h` Description: @@ -19,5 +19,4 @@ The files in this directory have been prepared as follows. - Take the unmodified source code files from the zlib distribution that are included by `ftgzip.c`. - Copy `zconf.h` to `ftzconf.h` (which stays unmodified otherwise). - - Run zlib's `zlib2ansi` script on all `.c` files. - Apply the diff file(s) in the `patches` folder. diff --git a/src/gzip/adler32.c b/src/gzip/adler32.c index aa032e1dd..260185b67 100644 --- a/src/gzip/adler32.c +++ b/src/gzip/adler32.c @@ -7,10 +7,6 @@ #include "zutil.h" -#ifndef Z_FREETYPE -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); -#endif - #define BASE 65521U /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ @@ -62,11 +58,7 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); #endif /* ========================================================================= */ -uLong ZEXPORT adler32_z( - uLong adler, - const Bytef *buf, - z_size_t len) -{ +uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) { unsigned long sum2; unsigned n; @@ -133,22 +125,14 @@ uLong ZEXPORT adler32_z( } /* ========================================================================= */ -uLong ZEXPORT adler32( - uLong adler, - const Bytef *buf, - uInt len) -{ +uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) { return adler32_z(adler, buf, len); } #ifndef Z_FREETYPE /* ========================================================================= */ -local uLong adler32_combine_( - uLong adler1, - uLong adler2, - z_off64_t len2) -{ +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) { unsigned long sum1; unsigned long sum2; unsigned rem; @@ -173,19 +157,11 @@ local uLong adler32_combine_( } /* ========================================================================= */ -uLong ZEXPORT adler32_combine( - uLong adler1, - uLong adler2, - z_off_t len2) -{ +uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { return adler32_combine_(adler1, adler2, len2); } -uLong ZEXPORT adler32_combine64( - uLong adler1, - uLong adler2, - z_off64_t len2) -{ +uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { return adler32_combine_(adler1, adler2, len2); } diff --git a/src/gzip/crc32.c b/src/gzip/crc32.c index 6cd1b09d5..27487dcc2 100644 --- a/src/gzip/crc32.c +++ b/src/gzip/crc32.c @@ -103,21 +103,6 @@ # define ARMCRC32 #endif -#ifndef Z_FREETYPE -/* Local functions. */ -local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); -local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); -#endif /* Z_FREETYPE */ - -#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) - local z_word_t byte_swap OF((z_word_t word)); -#endif - -#if defined(W) && !defined(ARMCRC32) - local z_crc_t crc_word OF((z_word_t data)); - local z_word_t crc_word_big OF((z_word_t data)); -#endif - #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) /* Swap the bytes in a z_word_t to convert between little and big endian. Any @@ -125,9 +110,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); instruction, if one is available. This assumes that word_t is either 32 bits or 64 bits. */ -local z_word_t byte_swap( - z_word_t word) -{ +local z_word_t byte_swap(z_word_t word) { # if W == 8 return (word & 0xff00000000000000) >> 56 | @@ -148,24 +131,81 @@ local z_word_t byte_swap( } #endif +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Table of powers of x for combining CRC-32s, filled in by make_crc_table() + * below. + */ + local z_crc_t FAR x2n_table[32]; +#else +/* ========================================================================= + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers + * of x for combining CRC-32s, all made by make_crc_table(). + */ +# include "crc32.h" +#endif + /* CRC polynomial. */ #define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ -#ifdef DYNAMIC_CRC_TABLE +#ifndef Z_FREETYPE +/* + Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, + reflected. For speed, this requires that a not be zero. + */ +local z_crc_t multmodp(z_crc_t a, z_crc_t b) { + z_crc_t m, p; + + m = (z_crc_t)1 << 31; + p = 0; + for (;;) { + if (a & m) { + p ^= b; + if ((a & (m - 1)) == 0) + break; + } + m >>= 1; + b = b & 1 ? (b >> 1) ^ POLY : b >> 1; + } + return p; +} + +/* + Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been + initialized. + */ +local z_crc_t x2nmodp(z_off64_t n, unsigned k) { + z_crc_t p; + + p = (z_crc_t)1 << 31; /* x^0 == 1 */ + while (n) { + if (n & 1) + p = multmodp(x2n_table[k & 31], p); + n >>= 1; + k++; + } + return p; +} + +#endif /* !Z_FREETYPE */ + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Build the tables for byte-wise and braided CRC-32 calculations, and a table + * of powers of x for combining CRC-32s. + */ local z_crc_t FAR crc_table[256]; -local z_crc_t FAR x2n_table[32]; -local void make_crc_table OF((void)); #ifdef W local z_word_t FAR crc_big_table[256]; local z_crc_t FAR crc_braid_table[W][256]; local z_word_t FAR crc_braid_big_table[W][256]; - local void braid OF((z_crc_t [][256], z_word_t [][256], int, int)); + local void braid(z_crc_t [][256], z_word_t [][256], int, int); #endif #ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *, int)); - local void write_table32hi OF((FILE *, const z_word_t FAR *, int)); - local void write_table64 OF((FILE *, const z_word_t FAR *, int)); + local void write_table(FILE *, const z_crc_t FAR *, int); + local void write_table32hi(FILE *, const z_word_t FAR *, int); + local void write_table64(FILE *, const z_word_t FAR *, int); #endif /* MAKECRCH */ /* @@ -178,7 +218,6 @@ local void make_crc_table OF((void)); /* Definition of once functionality. */ typedef struct once_s once_t; -local void once OF((once_t *, void (*)(void))); /* Check for the availability of atomics. */ #if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ @@ -198,10 +237,7 @@ struct once_s { invoke once() at the same time. The state must be a once_t initialized with ONCE_INIT. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ +local void once(once_t *state, void (*init)(void)) { if (!atomic_load(&state->done)) { if (atomic_flag_test_and_set(&state->begun)) while (!atomic_load(&state->done)) @@ -224,10 +260,7 @@ struct once_s { /* Test and set. Alas, not atomic, but tries to minimize the period of vulnerability. */ -local int test_and_set OF((int volatile *)); -local int test_and_set( - int volatile *flag) -{ +local int test_and_set(int volatile *flag) { int was; was = *flag; @@ -236,10 +269,7 @@ local int test_and_set( } /* Run the provided init() function once. This is not thread-safe. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ +local void once(once_t *state, void (*init)(void)) { if (!state->done) { if (test_and_set(&state->begun)) while (!state->done) @@ -281,8 +311,7 @@ local once_t made = ONCE_INIT; combinations of CRC register values and incoming bytes. */ -local void make_crc_table() -{ +local void make_crc_table(void) { unsigned i, j, n; z_crc_t p; @@ -449,11 +478,7 @@ local void make_crc_table() Write the 32-bit values in table[0..k-1] to out, five per line in hexadecimal separated by commas. */ -local void write_table( - FILE *out, - const z_crc_t FAR *table, - int k) -{ +local void write_table(FILE *out, const z_crc_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -466,11 +491,7 @@ local void write_table( Write the high 32-bits of each value in table[0..k-1] to out, five per line in hexadecimal separated by commas. */ -local void write_table32hi( - FILE *out, - const z_word_t FAR *table, - int k) -{ +local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -486,11 +507,7 @@ local void write_table32hi( bits. If not, then the type cast and format string can be adjusted accordingly. */ -local void write_table64( - FILE *out, - const z_word_t FAR *table, - int k) -{ +local void write_table64(FILE *out, const z_word_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -500,8 +517,7 @@ local void write_table64( } /* Actually do the deed. */ -int main() -{ +int main(void) { make_crc_table(); return 0; } @@ -513,12 +529,7 @@ int main() Generate the little and big-endian braid tables for the given n and z_word_t size w. Each array must have room for w blocks of 256 elements. */ -local void braid(ltl, big, n, w) - z_crc_t ltl[][256]; - z_word_t big[][256]; - int n; - int w; -{ +local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) { int k; z_crc_t i, p, q; for (k = 0; k < w; k++) { @@ -533,78 +544,22 @@ local void braid(ltl, big, n, w) } #endif -#else /* !DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Tables for byte-wise and braided CRC-32 calculations, and a table of powers - * of x for combining CRC-32s, all made by make_crc_table(). - */ -#include "crc32.h" #endif /* DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Routines used for CRC calculation. Some are also required for the table - * generation above. - */ - #ifndef Z_FREETYPE -/* - Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, - reflected. For speed, this requires that a not be zero. - */ -local z_crc_t multmodp( - z_crc_t a, - z_crc_t b) -{ - z_crc_t m, p; - - m = (z_crc_t)1 << 31; - p = 0; - for (;;) { - if (a & m) { - p ^= b; - if ((a & (m - 1)) == 0) - break; - } - m >>= 1; - b = b & 1 ? (b >> 1) ^ POLY : b >> 1; - } - return p; -} - -/* - Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been - initialized. - */ -local z_crc_t x2nmodp( - z_off64_t n, - unsigned k) -{ - z_crc_t p; - - p = (z_crc_t)1 << 31; /* x^0 == 1 */ - while (n) { - if (n & 1) - p = multmodp(x2n_table[k & 31], p); - n >>= 1; - k++; - } - return p; -} - /* ========================================================================= * This function can be used by asm versions of crc32(), and to force the * generation of the CRC tables in a threaded application. */ -const z_crc_t FAR * ZEXPORT get_crc_table() -{ +const z_crc_t FAR * ZEXPORT get_crc_table(void) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ return (const z_crc_t FAR *)crc_table; } -#endif /* Z_FREETYPE */ +#endif /* !Z_FREETYPE */ /* ========================================================================= * Use ARM machine instructions if available. This will compute the CRC about @@ -625,11 +580,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table() #define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ #define Z_BATCH_MIN 800 /* fewest words in a final batch */ -unsigned long ZEXPORT crc32_z( - unsigned long crc, - const unsigned char FAR *buf, - z_size_t len) -{ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { z_crc_t val; z_word_t crc1, crc2; const z_word_t *word; @@ -729,18 +681,14 @@ unsigned long ZEXPORT crc32_z( least-significant byte of the word as the first byte of data, without any pre or post conditioning. This is used to combine the CRCs of each braid. */ -local z_crc_t crc_word( - z_word_t data) -{ +local z_crc_t crc_word(z_word_t data) { int k; for (k = 0; k < W; k++) data = (data >> 8) ^ crc_table[data & 0xff]; return (z_crc_t)data; } -local z_word_t crc_word_big( - z_word_t data) -{ +local z_word_t crc_word_big(z_word_t data) { int k; for (k = 0; k < W; k++) data = (data << 8) ^ @@ -751,11 +699,8 @@ local z_word_t crc_word_big( #endif /* ========================================================================= */ -unsigned long ZEXPORT crc32_z( - unsigned long crc, - const unsigned char FAR *buf, - z_size_t len) -{ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { /* Return initial CRC, if requested. */ if (buf == Z_NULL) return 0; @@ -787,8 +732,8 @@ unsigned long ZEXPORT crc32_z( words = (z_word_t const *)buf; /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianess at execution time. If the - compiler knows what the endianess will be, it can optimize out the + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the check and the unused branch. */ endian = 1; if (*(unsigned char *)&endian) { @@ -1075,22 +1020,15 @@ unsigned long ZEXPORT crc32_z( #endif /* ========================================================================= */ -unsigned long ZEXPORT crc32( - unsigned long crc, - const unsigned char FAR *buf, - uInt len) -{ +unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, + uInt len) { return crc32_z(crc, buf, len); } #ifndef Z_FREETYPE /* ========================================================================= */ -uLong ZEXPORT crc32_combine64( - uLong crc1, - uLong crc2, - z_off64_t len2) -{ +uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -1098,18 +1036,12 @@ uLong ZEXPORT crc32_combine64( } /* ========================================================================= */ -uLong ZEXPORT crc32_combine( - uLong crc1, - uLong crc2, - z_off_t len2) -{ +uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) { return crc32_combine64(crc1, crc2, (z_off64_t)len2); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen64( - z_off64_t len2) -{ +uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -1117,19 +1049,13 @@ uLong ZEXPORT crc32_combine_gen64( } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen( - z_off_t len2) -{ +uLong ZEXPORT crc32_combine_gen(z_off_t len2) { return crc32_combine_gen64((z_off64_t)len2); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_op( - uLong crc1, - uLong crc2, - uLong op) -{ +uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) { return multmodp(op, crc1) ^ (crc2 & 0xffffffff); } -#endif /* Z_FREETYPE */ +#endif /* !Z_FREETYPE */ diff --git a/src/gzip/ftzconf.h b/src/gzip/ftzconf.h index bf977d3e7..fb76ffe31 100644 --- a/src/gzip/ftzconf.h +++ b/src/gzip/ftzconf.h @@ -241,7 +241,11 @@ #endif #ifdef Z_SOLO - typedef unsigned long z_size_t; +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif #else # define z_longlong long long # if defined(NO_SIZE_T) @@ -520,7 +524,7 @@ typedef uLong FAR uLongf; #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# if defined(_WIN32) && !defined(__GNUC__) # define z_off64_t __int64 # else # define z_off64_t z_off_t diff --git a/src/gzip/gzguts.h b/src/gzip/gzguts.h index 4f09a52a7..f9a250b85 100644 --- a/src/gzip/gzguts.h +++ b/src/gzip/gzguts.h @@ -7,9 +7,8 @@ # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif +# undef _FILE_OFFSET_BITS +# undef _TIME_BITS #endif #ifdef HAVE_HIDDEN @@ -119,8 +118,8 @@ /* gz* functions always use library allocation functions */ #ifndef STDC - extern voidp malloc OF((uInt size)); - extern void free OF((voidpf ptr)); + extern voidp malloc(uInt size); + extern void free(voidpf ptr); #endif /* get errno and strerror definition */ @@ -138,10 +137,10 @@ /* provide prototypes for these when building zlib without LFS */ #if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); #endif /* default memLevel */ @@ -203,9 +202,9 @@ typedef struct { typedef gz_state FAR *gz_statep; /* shared functions */ -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +void ZLIB_INTERNAL gz_error(gz_statep, int, const char *); #if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); +char ZLIB_INTERNAL *gz_strwinerror(DWORD error); #endif /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t @@ -214,6 +213,6 @@ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); #ifdef INT_MAX # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) #else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); +unsigned ZLIB_INTERNAL gz_intmax(void); # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) #endif diff --git a/src/gzip/inffast.c b/src/gzip/inffast.c index 809737b13..9354676e7 100644 --- a/src/gzip/inffast.c +++ b/src/gzip/inffast.c @@ -47,10 +47,7 @@ requires strm->avail_out >= 258 for each loop to avoid checking for output space. */ -void ZLIB_INTERNAL inflate_fast( - z_streamp strm, - unsigned start) -{ +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { struct inflate_state FAR *state; z_const unsigned char FAR *in; /* local strm->next_in */ z_const unsigned char FAR *last; /* have enough input while in < last */ diff --git a/src/gzip/inffast.h b/src/gzip/inffast.h index 684ae878c..a38c5be45 100644 --- a/src/gzip/inffast.h +++ b/src/gzip/inffast.h @@ -8,4 +8,4 @@ subject to change. Applications should only use zlib.h. */ -static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); +static void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); diff --git a/src/gzip/inflate.c b/src/gzip/inflate.c index 5117e2e26..f7ed5d181 100644 --- a/src/gzip/inflate.c +++ b/src/gzip/inflate.c @@ -91,22 +91,7 @@ # endif #endif -/* function prototypes */ -local int inflateStateCheck OF((z_streamp strm)); -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - unsigned copy)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -#ifndef Z_FREETYPE -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); -#endif - -local int inflateStateCheck( - z_streamp strm) -{ +local int inflateStateCheck(z_streamp strm) { struct inflate_state FAR *state; if (strm == Z_NULL || strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) @@ -118,9 +103,7 @@ local int inflateStateCheck( return 0; } -int ZEXPORT inflateResetKeep( - z_streamp strm) -{ +int ZEXPORT inflateResetKeep(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -144,9 +127,7 @@ int ZEXPORT inflateResetKeep( return Z_OK; } -int ZEXPORT inflateReset( - z_streamp strm) -{ +int ZEXPORT inflateReset(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -157,10 +138,7 @@ int ZEXPORT inflateReset( return inflateResetKeep(strm); } -int ZEXPORT inflateReset2( - z_streamp strm, - int windowBits) -{ +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { int wrap; struct inflate_state FAR *state; @@ -197,12 +175,8 @@ int ZEXPORT inflateReset2( return inflateReset(strm); } -int ZEXPORT inflateInit2_( - z_streamp strm, - int windowBits, - const char *version, - int stream_size) -{ +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size) { int ret; struct inflate_state FAR *state; @@ -243,22 +217,17 @@ int ZEXPORT inflateInit2_( #ifndef Z_FREETYPE -int ZEXPORT inflateInit_( - z_streamp strm, - const char *version, - int stream_size) -{ +int ZEXPORT inflateInit_(z_streamp strm, const char *version, + int stream_size) { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } -int ZEXPORT inflatePrime( - z_streamp strm, - int bits, - int value) -{ +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + if (bits == 0) + return Z_OK; state = (struct inflate_state FAR *)strm->state; if (bits < 0) { state->hold = 0; @@ -284,9 +253,7 @@ int ZEXPORT inflatePrime( used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables( - struct inflate_state FAR *state) -{ +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; static code *lenfix, *distfix; @@ -348,7 +315,7 @@ local void fixedtables( a.out > inffixed.h */ -void makefixed() +void makefixed(void) { unsigned low, size; struct inflate_state state; @@ -402,11 +369,7 @@ void makefixed() output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow( - z_streamp strm, - const Bytef *end, - unsigned copy) -{ +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { struct inflate_state FAR *state; unsigned dist; @@ -628,10 +591,7 @@ local int updatewindow( will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate( - z_streamp strm, - int flush) -{ +int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ @@ -1307,9 +1267,7 @@ int ZEXPORT inflate( return ret; } -int ZEXPORT inflateEnd( - z_streamp strm) -{ +int ZEXPORT inflateEnd(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1323,11 +1281,8 @@ int ZEXPORT inflateEnd( #ifndef Z_FREETYPE -int ZEXPORT inflateGetDictionary( - z_streamp strm, - Bytef *dictionary, - uInt *dictLength) -{ +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { struct inflate_state FAR *state; /* check state */ @@ -1346,11 +1301,8 @@ int ZEXPORT inflateGetDictionary( return Z_OK; } -int ZEXPORT inflateSetDictionary( - z_streamp strm, - const Bytef *dictionary, - uInt dictLength) -{ +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { struct inflate_state FAR *state; unsigned long dictid; int ret; @@ -1381,10 +1333,7 @@ int ZEXPORT inflateSetDictionary( return Z_OK; } -int ZEXPORT inflateGetHeader( - z_streamp strm, - gz_headerp head) -{ +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { struct inflate_state FAR *state; /* check state */ @@ -1409,11 +1358,8 @@ int ZEXPORT inflateGetHeader( called again with more data and the *have state. *have is initialized to zero for the first call. */ -local unsigned syncsearch( - unsigned FAR *have, - const unsigned char FAR *buf, - unsigned len) -{ +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, + unsigned len) { unsigned got; unsigned next; @@ -1432,9 +1378,7 @@ local unsigned syncsearch( return next; } -int ZEXPORT inflateSync( - z_streamp strm) -{ +int ZEXPORT inflateSync(z_streamp strm) { unsigned len; /* number of bytes to look at or looked at */ int flags; /* temporary to save header status */ unsigned long in, out; /* temporary to save total_in and total_out */ @@ -1490,9 +1434,7 @@ int ZEXPORT inflateSync( block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ -int ZEXPORT inflateSyncPoint( - z_streamp strm) -{ +int ZEXPORT inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1500,10 +1442,7 @@ int ZEXPORT inflateSyncPoint( return state->mode == STORED && state->bits == 0; } -int ZEXPORT inflateCopy( - z_streamp dest, - z_streamp source) -{ +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { struct inflate_state FAR *state; struct inflate_state FAR *copy; unsigned char FAR *window; @@ -1547,10 +1486,7 @@ int ZEXPORT inflateCopy( return Z_OK; } -int ZEXPORT inflateUndermine( - z_streamp strm, - int subvert) -{ +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1565,10 +1501,7 @@ int ZEXPORT inflateUndermine( #endif } -int ZEXPORT inflateValidate( - z_streamp strm, - int check) -{ +int ZEXPORT inflateValidate(z_streamp strm, int check) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1580,9 +1513,7 @@ int ZEXPORT inflateValidate( return Z_OK; } -long ZEXPORT inflateMark( - z_streamp strm) -{ +long ZEXPORT inflateMark(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) @@ -1593,9 +1524,7 @@ long ZEXPORT inflateMark( (state->mode == MATCH ? state->was - state->length : 0)); } -unsigned long ZEXPORT inflateCodesUsed( - z_streamp strm) -{ +unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return (unsigned long)-1; state = (struct inflate_state FAR *)strm->state; diff --git a/src/gzip/inflate.h b/src/gzip/inflate.h index c6f5a52e1..8a0e437ae 100644 --- a/src/gzip/inflate.h +++ b/src/gzip/inflate.h @@ -128,4 +128,4 @@ struct inflate_state { unsigned was; /* initial length of match */ }; -#endif /* INFLATE_H */ +#endif /* !INFLATE_H */ diff --git a/src/gzip/inftrees.c b/src/gzip/inftrees.c index dd4965e9a..1fd655593 100644 --- a/src/gzip/inftrees.c +++ b/src/gzip/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2022 Mark Adler + * Copyright (C) 1995-2023 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 static const char inflate_copyright[] = - " inflate 1.2.13 Copyright 1995-2022 Mark Adler "; + " inflate 1.3 Copyright 1995-2023 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,14 +29,9 @@ static const char inflate_copyright[] = table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ -int ZLIB_INTERNAL inflate_table( - codetype type, - unsigned short FAR *lens, - unsigned codes, - code FAR * FAR *table, - unsigned FAR *bits, - unsigned short FAR *work) -{ +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work) { unsigned len; /* a code's length in bits */ unsigned sym; /* index of code symbols */ unsigned min, max; /* minimum and maximum code lengths */ @@ -62,7 +57,7 @@ int ZLIB_INTERNAL inflate_table( 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 194, 65}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/src/gzip/inftrees.h b/src/gzip/inftrees.h index a2207efb1..47f726c36 100644 --- a/src/gzip/inftrees.h +++ b/src/gzip/inftrees.h @@ -60,8 +60,8 @@ typedef enum { DISTS } codetype; -static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); +static int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work); -#endif /* INFTREES_H_ */ +#endif /* !INFTREES_H */ diff --git a/src/gzip/patches/freetype-zlib.diff b/src/gzip/patches/freetype-zlib.diff index 6ac76df62..9486bd02a 100644 --- a/src/gzip/patches/freetype-zlib.diff +++ b/src/gzip/patches/freetype-zlib.diff @@ -30,88 +30,84 @@ prevent compiler errors. (inflate_table): Declare as static. diff --git b/src/gzip/adler32.c a/src/gzip/adler32.c -index be5e8a247..aa032e1dd 100644 +index 04b81d29b..260185b67 100644 --- b/src/gzip/adler32.c +++ a/src/gzip/adler32.c -@@ -7,7 +7,9 @@ - - #include "zutil.h" - -+#ifndef Z_FREETYPE - local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); -+#endif - - #define BASE 65521U /* largest prime smaller than 65536 */ - #define NMAX 5552 -@@ -139,6 +141,8 @@ uLong ZEXPORT adler32( +@@ -129,6 +129,8 @@ uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) { return adler32_z(adler, buf, len); } +#ifndef Z_FREETYPE + /* ========================================================================= */ - local uLong adler32_combine_( - uLong adler1, -@@ -184,3 +188,5 @@ uLong ZEXPORT adler32_combine64( - { + local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) { + unsigned long sum1; +@@ -162,3 +164,5 @@ uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { + uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { return adler32_combine_(adler1, adler2, len2); } + +#endif /* !Z_FREETYPE */ diff --git b/src/gzip/crc32.c a/src/gzip/crc32.c -index 3a52aa89d..6cd1b09d5 100644 +index 6c38f5c04..27487dcc2 100644 --- b/src/gzip/crc32.c +++ a/src/gzip/crc32.c -@@ -103,9 +103,11 @@ - # define ARMCRC32 - #endif - -+#ifndef Z_FREETYPE - /* Local functions. */ - local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); - local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); -+#endif /* Z_FREETYPE */ - - #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) - local z_word_t byte_swap OF((z_word_t word)); -@@ -544,6 +546,8 @@ local void braid(ltl, big, n, w) - * generation above. - */ +@@ -148,6 +148,8 @@ local z_word_t byte_swap(z_word_t word) { + /* CRC polynomial. */ + #define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ +#ifndef Z_FREETYPE + /* Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, reflected. For speed, this requires that a not be zero. -@@ -600,6 +604,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table() +@@ -186,6 +188,8 @@ local z_crc_t x2nmodp(z_off64_t n, unsigned k) { + return p; + } + ++#endif /* !Z_FREETYPE */ ++ + #ifdef DYNAMIC_CRC_TABLE + /* ========================================================================= + * Build the tables for byte-wise and braided CRC-32 calculations, and a table +@@ -542,6 +546,8 @@ local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) { + + #endif /* DYNAMIC_CRC_TABLE */ + ++#ifndef Z_FREETYPE ++ + /* ========================================================================= + * This function can be used by asm versions of crc32(), and to force the + * generation of the CRC tables in a threaded application. +@@ -553,6 +559,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table(void) { return (const z_crc_t FAR *)crc_table; } -+#endif /* Z_FREETYPE */ ++#endif /* !Z_FREETYPE */ + /* ========================================================================= * Use ARM machine instructions if available. This will compute the CRC about * ten times faster than the braided calculation. This code does not check for -@@ -1077,6 +1083,8 @@ unsigned long ZEXPORT crc32( +@@ -1017,6 +1025,8 @@ unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, return crc32_z(crc, buf, len); } +#ifndef Z_FREETYPE + /* ========================================================================= */ - uLong ZEXPORT crc32_combine64( - uLong crc1, -@@ -1123,3 +1131,5 @@ uLong ZEXPORT crc32_combine_op( - { + uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) { + #ifdef DYNAMIC_CRC_TABLE +@@ -1047,3 +1057,5 @@ uLong ZEXPORT crc32_combine_gen(z_off_t len2) { + uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) { return multmodp(op, crc1) ^ (crc2 & 0xffffffff); } + -+#endif /* Z_FREETYPE */ ++#endif /* !Z_FREETYPE */ diff --git b/src/gzip/gzguts.h a/src/gzip/gzguts.h -index 57faf3716..4f09a52a7 100644 +index f9375047e..f9a250b85 100644 --- b/src/gzip/gzguts.h +++ a/src/gzip/gzguts.h -@@ -163,7 +163,7 @@ +@@ -162,7 +162,7 @@ /* values for gz_state how */ #define LOOK 0 /* look for a gzip header */ @@ -121,40 +117,29 @@ index 57faf3716..4f09a52a7 100644 /* internal gzip file state data structure */ diff --git b/src/gzip/inffast.h a/src/gzip/inffast.h -index e5c1aa4ca..684ae878c 100644 +index 49c6d156c..a38c5be45 100644 --- b/src/gzip/inffast.h +++ a/src/gzip/inffast.h @@ -8,4 +8,4 @@ subject to change. Applications should only use zlib.h. */ --void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); -+static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); +-void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); ++static void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); diff --git b/src/gzip/inflate.c a/src/gzip/inflate.c -index c9e566b03..5117e2e26 100644 +index b0757a9b2..f7ed5d181 100644 --- b/src/gzip/inflate.c +++ a/src/gzip/inflate.c -@@ -99,8 +99,10 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - #ifdef BUILDFIXED - void makefixed OF((void)); - #endif -+#ifndef Z_FREETYPE - local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); -+#endif - - local int inflateStateCheck( - z_streamp strm) -@@ -239,6 +241,8 @@ int ZEXPORT inflateInit2_( +@@ -215,6 +215,8 @@ int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, return ret; } +#ifndef Z_FREETYPE + - int ZEXPORT inflateInit_( - z_streamp strm, - const char *version, -@@ -268,6 +272,8 @@ int ZEXPORT inflatePrime( + int ZEXPORT inflateInit_(z_streamp strm, const char *version, + int stream_size) { + return inflateInit2_(strm, DEF_WBITS, version, stream_size); +@@ -239,6 +241,8 @@ int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { return Z_OK; } @@ -163,23 +148,23 @@ index c9e566b03..5117e2e26 100644 /* Return state with length and distance decoding tables and index sizes set to fixed code decoding. Normally this returns fixed tables from inffixed.h. -@@ -1315,6 +1321,8 @@ int ZEXPORT inflateEnd( +@@ -1275,6 +1279,8 @@ int ZEXPORT inflateEnd(z_streamp strm) { return Z_OK; } +#ifndef Z_FREETYPE + - int ZEXPORT inflateGetDictionary( - z_streamp strm, - Bytef *dictionary, -@@ -1593,3 +1601,5 @@ unsigned long ZEXPORT inflateCodesUsed( + int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { + struct inflate_state FAR *state; +@@ -1524,3 +1530,5 @@ unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) { state = (struct inflate_state FAR *)strm->state; return (unsigned long)(state->next - state->codes); } + +#endif /* !Z_FREETYPE */ diff --git b/src/gzip/inflate.h a/src/gzip/inflate.h -index f127b6b1f..c6f5a52e1 100644 +index f127b6b1f..8a0e437ae 100644 --- b/src/gzip/inflate.h +++ a/src/gzip/inflate.h @@ -3,6 +3,9 @@ @@ -197,9 +182,9 @@ index f127b6b1f..c6f5a52e1 100644 unsigned was; /* initial length of match */ }; + -+#endif /* INFLATE_H */ ++#endif /* !INFLATE_H */ diff --git b/src/gzip/inftrees.c a/src/gzip/inftrees.c -index d8405a24c..dd4965e9a 100644 +index 8a208c2da..1fd655593 100644 --- b/src/gzip/inftrees.c +++ a/src/gzip/inftrees.c @@ -8,7 +8,7 @@ @@ -208,11 +193,11 @@ index d8405a24c..dd4965e9a 100644 -const char inflate_copyright[] = +static const char inflate_copyright[] = - " inflate 1.2.13 Copyright 1995-2022 Mark Adler "; + " inflate 1.3 Copyright 1995-2023 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome diff --git b/src/gzip/inftrees.h a/src/gzip/inftrees.h -index f53665311..a2207efb1 100644 +index a10712d8c..47f726c36 100644 --- b/src/gzip/inftrees.h +++ a/src/gzip/inftrees.h @@ -3,6 +3,9 @@ @@ -229,14 +214,14 @@ index f53665311..a2207efb1 100644 DISTS } codetype; --int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, -+static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); +-int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, ++static int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work); + -+#endif /* INFTREES_H_ */ ++#endif /* !INFTREES_H */ diff --git b/src/gzip/zlib.h a/src/gzip/zlib.h -index 953cb5012..3f2f76e3c 100644 +index 6b7244f99..5c7a884c9 100644 --- b/src/gzip/zlib.h +++ a/src/gzip/zlib.h @@ -31,7 +31,7 @@ @@ -257,60 +242,60 @@ index 953cb5012..3f2f76e3c 100644 #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ -@@ -373,6 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +@@ -373,6 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); deallocated). */ +#endif /* !Z_FREETYPE */ /* - ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); -@@ -534,6 +537,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); + ZEXTERN int ZEXPORT inflateInit(z_streamp strm); +@@ -535,6 +538,8 @@ ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); The following functions are needed only in some special applications. */ +#ifndef Z_FREETYPE + /* - ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, -@@ -956,6 +961,8 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, + int level, +@@ -958,6 +963,8 @@ ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, destination. */ +#endif /* !Z_FREETYPE */ + - ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); + ZEXTERN int ZEXPORT inflateReset(z_streamp strm); /* This function is equivalent to inflateEnd followed by inflateInit, -@@ -980,6 +987,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, +@@ -983,6 +990,8 @@ ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, the windowBits parameter is invalid. */ +#ifndef Z_FREETYPE + - ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -@@ -1069,6 +1078,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, + int bits, + int value); +@@ -1072,6 +1081,8 @@ ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, stream state was inconsistent. */ +#endif /* !Z_FREETYPE */ + /* - ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); -@@ -1095,6 +1106,8 @@ typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); - typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); + ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, + unsigned char FAR *window); +@@ -1098,6 +1109,8 @@ typedef unsigned (*in_func)(void FAR *, + z_const unsigned char FAR * FAR *); + typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); +#ifndef Z_FREETYPE + - ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -@@ -1214,6 +1227,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); + ZEXTERN int ZEXPORT inflateBack(z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); +@@ -1217,6 +1230,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags(void); 27-31: 0 (reserved) */ @@ -319,63 +304,61 @@ index 953cb5012..3f2f76e3c 100644 #ifndef Z_SOLO /* utility functions */ -@@ -1765,6 +1780,8 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); +@@ -1768,6 +1783,8 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); crc32_combine_op(). */ +#ifndef Z_FREETYPE + - ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); + ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); /* Give the same result as crc32_combine(), using op in place of len2. op is -@@ -1822,6 +1839,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, +@@ -1825,6 +1842,17 @@ ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, ZLIB_VERSION, (int)sizeof(z_stream)) #endif +#else /* Z_FREETYPE */ + -+ -+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, -+ const char *version, int stream_size)); ++ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, ++ const char *version, int stream_size); + +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) + +#endif /* Z_FREETYPE */ -+ + #ifndef Z_SOLO /* gzgetc() macro and its supporting function and exposed data structure. Note -@@ -1901,20 +1931,25 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +@@ -1904,20 +1932,25 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ #else /* Z_SOLO */ +#ifndef Z_FREETYPE - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); +#endif #endif /* !Z_SOLO */ /* undocumented functions */ +#ifndef Z_FREETYPE - ZEXTERN const char * ZEXPORT zError OF((int)); - ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); - ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); - ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); - ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); - ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF((z_streamp)); + ZEXTERN const char * ZEXPORT zError(int); + ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); + ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); + ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); + ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); + ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); +#endif /* !Z_FREETYPE */ - ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); + ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); +#ifndef Z_FREETYPE - ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); + ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); #if defined(_WIN32) && !defined(Z_SOLO) - ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, -@@ -1927,6 +1962,7 @@ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - va_list va)); + ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, +@@ -1930,6 +1963,7 @@ ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, + va_list va); # endif #endif +#endif /* !Z_FREETYPE */ @@ -383,7 +366,7 @@ index 953cb5012..3f2f76e3c 100644 #ifdef __cplusplus } diff --git b/src/gzip/zutil.c a/src/gzip/zutil.c -index ef174ca64..542706ca0 100644 +index b1c5d2d3c..f76def425 100644 --- b/src/gzip/zutil.c +++ a/src/gzip/zutil.c @@ -10,6 +10,8 @@ @@ -395,7 +378,7 @@ index ef174ca64..542706ca0 100644 z_const char * const z_errmsg[10] = { (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ (z_const char *)"stream end", /* Z_STREAM_END 1 */ -@@ -138,6 +140,8 @@ const char * ZEXPORT zError( +@@ -132,6 +134,8 @@ const char * ZEXPORT zError(int err) { return ERR_MSG(err); } @@ -404,16 +387,15 @@ index ef174ca64..542706ca0 100644 #if defined(_WIN32_WCE) && _WIN32_WCE < 0x800 /* The older Microsoft C Run-Time Library for Windows CE doesn't have * errno. We define it as a global variable to simplify porting. -@@ -159,6 +163,8 @@ void ZLIB_INTERNAL zmemcpy( +@@ -149,6 +153,7 @@ void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) { } while (--len != 0); } +#ifndef Z_FREETYPE -+ - int ZLIB_INTERNAL zmemcmp( - const Bytef* s1, - const Bytef* s2, -@@ -181,6 +187,7 @@ void ZLIB_INTERNAL zmemzero( + int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) { + uInt j; + +@@ -164,6 +169,7 @@ void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) { *dest++ = 0; /* ??? to be unrolled */ } while (--len != 0); } @@ -422,7 +404,7 @@ index ef174ca64..542706ca0 100644 #ifndef Z_SOLO diff --git b/src/gzip/zutil.h a/src/gzip/zutil.h -index 0bc7f4ecd..055ba8b62 100644 +index 902a304cc..a2c046a1f 100644 --- b/src/gzip/zutil.h +++ a/src/gzip/zutil.h @@ -53,8 +53,10 @@ typedef unsigned long ulg; @@ -432,7 +414,7 @@ index 0bc7f4ecd..055ba8b62 100644 +#ifndef Z_FREETYPE extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ -+#endif /* !Z_FREETYPE */ ++#endif #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] @@ -446,7 +428,7 @@ index 0bc7f4ecd..055ba8b62 100644 #if !defined(_WIN32) && \ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) @@ -196,6 +200,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); #endif +#endif /* !Z_FREETYPE */ @@ -466,4 +448,4 @@ index 0bc7f4ecd..055ba8b62 100644 +# define zmemzero(dest, len) ft_memset(dest, 0, len) # endif #else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len); diff --git a/src/gzip/zlib.h b/src/gzip/zlib.h index 3f2f76e3c..5c7a884c9 100644 --- a/src/gzip/zlib.h +++ b/src/gzip/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.13, October 13th, 2022 + version 1.3, August 18th, 2023 - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.13" -#define ZLIB_VERNUM 0x12d0 +#define ZLIB_VERSION "1.3" +#define ZLIB_VERNUM 0x1300 #define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 13 +#define ZLIB_VER_MINOR 3 +#define ZLIB_VER_REVISION 0 #define ZLIB_VER_SUBREVISION 0 /* @@ -78,8 +78,8 @@ extern "C" { even in the case of corrupted input. */ -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); +typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size); +typedef void (*free_func)(voidpf opaque, voidpf address); struct internal_state; @@ -219,7 +219,7 @@ typedef gz_header FAR *gz_headerp; /* basic functions */ -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +ZEXTERN const char * ZEXPORT zlibVersion(void); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. This check @@ -227,12 +227,12 @@ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); */ /* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); +ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. + allocation functions. total_in, total_out, adler, and msg are initialized. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all @@ -249,7 +249,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); */ -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush); /* deflate compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce @@ -322,8 +322,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. + avail_out is greater than six when the flush marker begins, in order to avoid + repeated flush markers upon calling deflate() again when avail_out == 0. If the parameter flush is set to Z_FINISH, pending input is processed, pending output is flushed and deflate returns with Z_STREAM_END if there was @@ -362,7 +362,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending @@ -378,7 +378,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); #endif /* !Z_FREETYPE */ /* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateInit(z_streamp strm); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by @@ -386,7 +386,8 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); read or consumed. The allocation of a sliding window will be deferred to the first call of inflate (if the decompression does not complete on the first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the @@ -400,7 +401,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); */ -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush); /* inflate decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce @@ -520,7 +521,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending @@ -540,12 +541,12 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); #ifndef Z_FREETYPE /* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); +ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy); This is another version of deflateInit with more compression options. The fields zalloc, zfree and opaque must be initialized before by the caller. @@ -612,9 +613,9 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); /* Initializes the compression dictionary from the given byte sequence without producing any compressed output. When using the zlib format, this @@ -656,9 +657,9 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, not perform any compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); +ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); /* Returns the sliding dictionary being maintained by deflate. dictLength is set to the number of bytes in the dictionary, and that many bytes are copied @@ -678,8 +679,8 @@ ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, stream state is inconsistent. */ -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT deflateCopy(z_streamp dest, + z_streamp source); /* Sets the destination stream as a complete copy of the source stream. @@ -696,20 +697,20 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateReset(z_streamp strm); /* This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate the internal compression state. The stream will leave the compression level and any other attributes that may have been - set unchanged. + set unchanged. total_in, total_out, adler, and msg are initialized. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); +ZEXTERN int ZEXPORT deflateParams(z_streamp strm, + int level, + int strategy); /* Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2(). This can be @@ -734,7 +735,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, Then no more input data should be provided before the deflateParams() call. If this is done, the old level and strategy will be applied to the data compressed before deflateParams(), and the new level and strategy will be - applied to the the data compressed after deflateParams(). + applied to the data compressed after deflateParams(). deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if @@ -745,11 +746,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, retried with more output space. */ -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); +ZEXTERN int ZEXPORT deflateTune(z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain); /* Fine tune deflate's internal compression parameters. This should only be used by someone who understands the algorithm used by zlib's deflate for @@ -762,8 +763,8 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. */ -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); +ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, + uLong sourceLen); /* deflateBound() returns an upper bound on the compressed size after deflation of sourceLen bytes. It must be called after deflateInit() or @@ -777,9 +778,9 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, than Z_FINISH or Z_NO_FLUSH are used. */ -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); +ZEXTERN int ZEXPORT deflatePending(z_streamp strm, + unsigned *pending, + int *bits); /* deflatePending() returns the number of bytes and bits of output that have been generated, but not yet provided in the available output. The bytes not @@ -792,9 +793,9 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, stream state was inconsistent. */ -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); +ZEXTERN int ZEXPORT deflatePrime(z_streamp strm, + int bits, + int value); /* deflatePrime() inserts bits in the deflate output stream. The intent is that this function is used to start off the deflate output with the bits @@ -809,8 +810,8 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, source stream state was inconsistent. */ -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); +ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, + gz_headerp head); /* deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called @@ -826,16 +827,17 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gzip file" and give up. If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ /* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateInit2(z_streamp strm, + int windowBits); This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized @@ -888,9 +890,9 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, deferred until inflate() is called. */ -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); /* Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate, @@ -911,9 +913,9 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, inflate(). */ -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); +ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); /* Returns the sliding dictionary being maintained by inflate. dictLength is set to the number of bytes in the dictionary, and that many bytes are copied @@ -926,7 +928,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, stream state is inconsistent. */ -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateSync(z_streamp strm); /* Skips invalid compressed data until a possible full flush point (see above for the description of deflate with Z_FULL_FLUSH) can be found, or until all @@ -945,8 +947,8 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); input each time, until success or end of the input data. */ -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, + z_streamp source); /* Sets the destination stream as a complete copy of the source stream. @@ -963,18 +965,19 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, #endif /* !Z_FREETYPE */ -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateReset(z_streamp strm); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, + int windowBits); /* This function is the same as inflateReset, but it also permits changing the wrap and window size requests. The windowBits parameter is interpreted @@ -989,9 +992,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, #ifndef Z_FREETYPE -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); +ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, + int bits, + int value); /* This function inserts bits in the inflate input stream. The intent is that this function is used to start inflating at a bit position in the @@ -1010,7 +1013,7 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, stream state was inconsistent. */ -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +ZEXTERN long ZEXPORT inflateMark(z_streamp strm); /* This function returns two values, one in the lower 16 bits of the return value, and the other in the remaining upper bits, obtained by shifting the @@ -1038,8 +1041,8 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); source stream state was inconsistent. */ -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); +ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, + gz_headerp head); /* inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after @@ -1081,8 +1084,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, #endif /* !Z_FREETYPE */ /* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); +ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, + unsigned char FAR *window); Initialize the internal stream state for decompression using inflateBack() calls. The fields zalloc, zfree and opaque in strm must be initialized @@ -1102,15 +1105,15 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); +typedef unsigned (*in_func)(void FAR *, + z_const unsigned char FAR * FAR *); +typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); #ifndef Z_FREETYPE -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); +ZEXTERN int ZEXPORT inflateBack(z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); /* inflateBack() does a raw inflate with a single call using a call-back interface for input and output. This is potentially more efficient than @@ -1178,7 +1181,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, cannot return Z_OK. */ -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm); /* All memory allocated by inflateBackInit() is freed. @@ -1186,7 +1189,7 @@ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); state was inconsistent. */ -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +ZEXTERN uLong ZEXPORT zlibCompileFlags(void); /* Return flags indicating compile-time options. Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: @@ -1241,8 +1244,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); you need special options. */ -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1256,9 +1259,9 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, buffer. */ -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); +ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level); /* Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte @@ -1272,15 +1275,15 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, Z_STREAM_ERROR if the level parameter is invalid. */ -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen); /* compressBound() returns an upper bound on the compressed size after compress() or compress2() on sourceLen bytes. It would be used before a compress() or compress2() call to allocate the destination buffer. */ -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); /* Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1297,8 +1300,8 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, buffer with the uncompressed data up to that point. */ -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); +ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen); /* Same as uncompress, except that sourceLen is a pointer, where the length of the source is *sourceLen. On return, *sourceLen is the number of @@ -1317,7 +1320,7 @@ ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ /* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode); Open the gzip (.gz) file at path for reading and decompressing, or compressing and writing. The mode parameter is as in fopen ("rb" or "wb") @@ -1354,7 +1357,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); file could not be opened. */ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode); /* Associate a gzFile with the file descriptor fd. File descriptors are obtained from calls like open, dup, creat, pipe or fileno (if the file has @@ -1377,7 +1380,7 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); will not detect if fd is invalid (unless fd is -1). */ -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size); /* Set the internal buffer size used by this library's functions for file to size. The default buffer size is 8192 bytes. This function must be called @@ -1393,7 +1396,7 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); too late. */ -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy); /* Dynamically update the compression level and strategy for file. See the description of deflateInit2 for the meaning of these parameters. Previously @@ -1404,7 +1407,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); or Z_MEM_ERROR if there is a memory allocation error. */ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len); /* Read and decompress up to len uncompressed bytes from file into buf. If the input file is not in gzip format, gzread copies the given number of @@ -1434,8 +1437,8 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); Z_STREAM_ERROR. */ -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); +ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, + gzFile file); /* Read and decompress up to nitems items of size size from file into buf, otherwise operating as gzread() does. This duplicates the interface of @@ -1460,14 +1463,14 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, file, resetting and retrying on end-of-file, when size is not 1. */ -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); +ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len); /* Compress and write the len uncompressed bytes at buf to file. gzwrite returns the number of uncompressed bytes written or 0 in case of error. */ -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); +ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, + z_size_t nitems, gzFile file); /* Compress and write nitems items of size size from buf to file, duplicating the interface of stdio's fwrite(), with size_t request and return types. If @@ -1480,7 +1483,7 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, is returned, and the error state is set to Z_STREAM_ERROR. */ -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); /* Convert, format, compress, and write the arguments (...) to file under control of the string format, as in fprintf. gzprintf returns the number of @@ -1495,7 +1498,7 @@ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); This can be determined using zlibCompileFlags(). */ -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s); /* Compress and write the given null-terminated string s to file, excluding the terminating null character. @@ -1503,7 +1506,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); gzputs returns the number of characters written, or -1 in case of error. */ -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len); /* Read and decompress bytes from file into buf, until len-1 characters are read, or until a newline character is read and transferred to buf, or an @@ -1517,13 +1520,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); buf are indeterminate. */ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc(gzFile file, int c); /* Compress and write c, converted to an unsigned char, into file. gzputc returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +ZEXTERN int ZEXPORT gzgetc(gzFile file); /* Read and decompress one byte from file. gzgetc returns this byte or -1 in case of end of file or error. This is implemented as a macro for speed. @@ -1532,7 +1535,7 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); points to has been clobbered or not. */ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); /* Push c back onto the stream for file to be read as the first character on the next read. At least one character of push-back is always allowed. @@ -1544,7 +1547,7 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); gzseek() or gzrewind(). */ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); /* Flush all pending output to file. The parameter flush is as in the deflate() function. The return value is the zlib error number (see function @@ -1560,8 +1563,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); */ /* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); +ZEXTERN z_off_t ZEXPORT gzseek(gzFile file, + z_off_t offset, int whence); Set the starting position to offset relative to whence for the next gzread or gzwrite on file. The offset represents a number of bytes in the @@ -1579,7 +1582,7 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, would be before the current position. */ -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +ZEXTERN int ZEXPORT gzrewind(gzFile file); /* Rewind file. This function is supported only for reading. @@ -1587,7 +1590,7 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); */ /* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +ZEXTERN z_off_t ZEXPORT gztell(gzFile file); Return the starting position for the next gzread or gzwrite on file. This position represents a number of bytes in the uncompressed data stream, @@ -1598,7 +1601,7 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); */ /* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); +ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file); Return the current compressed (actual) read or write offset of file. This offset includes the count of bytes that precede the gzip stream, for example @@ -1607,7 +1610,7 @@ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); be used for a progress indicator. On error, gzoffset() returns -1. */ -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +ZEXTERN int ZEXPORT gzeof(gzFile file); /* Return true (1) if the end-of-file indicator for file has been set while reading, false (0) otherwise. Note that the end-of-file indicator is set @@ -1622,7 +1625,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); has grown since the previous end of file was detected. */ -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +ZEXTERN int ZEXPORT gzdirect(gzFile file); /* Return true (1) if file is being copied directly while reading, or false (0) if file is a gzip stream being decompressed. @@ -1643,7 +1646,7 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); gzip file reading and decompression, which may not be desired.) */ -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose(gzFile file); /* Flush all pending output for file, if necessary, close file and deallocate the (de)compression state. Note that once file is closed, you @@ -1656,8 +1659,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); last read ended in the middle of a gzip stream, or Z_OK on success. */ -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_r(gzFile file); +ZEXTERN int ZEXPORT gzclose_w(gzFile file); /* Same as gzclose(), but gzclose_r() is only for use when reading, and gzclose_w() is only for use when writing or appending. The advantage to @@ -1668,7 +1671,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); zlib library. */ -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); /* Return the error message for the last error which occurred on file. errnum is set to zlib error number. If an error occurred in the file system @@ -1684,7 +1687,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); functions above that do not distinguish those cases in their return values. */ -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +ZEXTERN void ZEXPORT gzclearerr(gzFile file); /* Clear the error and end-of-file flags for file. This is analogous to the clearerr() function in stdio. This is useful for continuing to read a gzip @@ -1701,7 +1704,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); library. */ -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and return the updated checksum. An Adler-32 value is in the range of a 32-bit @@ -1721,15 +1724,15 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); +ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, + z_size_t len); /* Same as adler32(), but with a size_t length. */ /* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); +ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, + z_off_t len2); Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for @@ -1739,7 +1742,7 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, negative, the result has no meaning or utility. */ -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. @@ -1757,14 +1760,14 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ -ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf, - z_size_t len)); +ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf, + z_size_t len); /* Same as crc32(), but with a size_t length. */ /* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were @@ -1774,7 +1777,7 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); */ /* -ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); Return the operator corresponding to length len2, to be used with crc32_combine_op(). @@ -1782,7 +1785,7 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); #ifndef Z_FREETYPE -ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); +ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); /* Give the same result as crc32_combine(), using op in place of len2. op is is generated from len2 by crc32_combine_gen(). This will be faster than @@ -1795,20 +1798,20 @@ ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); +ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateInit_(z_streamp strm, + const char *version, int stream_size); +ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size); +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size); #ifdef Z_PREFIX_SET # define z_deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) @@ -1841,9 +1844,8 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, #else /* Z_FREETYPE */ - -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); # define inflateInit2(strm, windowBits) \ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ @@ -1851,7 +1853,6 @@ ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, #endif /* Z_FREETYPE */ - #ifndef Z_SOLO /* gzgetc() macro and its supporting function and exposed data structure. Note @@ -1866,7 +1867,7 @@ struct gzFile_s { unsigned char *next; z_off64_t pos; }; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ #ifdef Z_PREFIX_SET # undef z_gzgetc # define z_gzgetc(g) \ @@ -1883,13 +1884,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ * without large file support, _LFS64_LARGEFILE must also be true */ #ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t); #endif #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) @@ -1911,55 +1912,55 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ # define crc32_combine_gen crc32_combine_gen64 # endif # ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); # endif #else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); #endif #else /* Z_SOLO */ #ifndef Z_FREETYPE - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); #endif #endif /* !Z_SOLO */ /* undocumented functions */ #ifndef Z_FREETYPE -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF((z_streamp)); +ZEXTERN const char * ZEXPORT zError(int); +ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); +ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); +ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); #endif /* !Z_FREETYPE */ -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); +ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); #ifndef Z_FREETYPE -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); #if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, + const char *mode); #endif #if defined(STDC) || defined(Z_HAVE_STDARG_H) # ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); +ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, + const char *format, + va_list va); # endif #endif #endif /* !Z_FREETYPE */ diff --git a/src/gzip/zutil.c b/src/gzip/zutil.c index 542706ca0..f76def425 100644 --- a/src/gzip/zutil.c +++ b/src/gzip/zutil.c @@ -26,13 +26,11 @@ z_const char * const z_errmsg[10] = { }; -const char * ZEXPORT zlibVersion() -{ +const char * ZEXPORT zlibVersion(void) { return ZLIB_VERSION; } -uLong ZEXPORT zlibCompileFlags() -{ +uLong ZEXPORT zlibCompileFlags(void) { uLong flags; flags = 0; @@ -123,9 +121,7 @@ uLong ZEXPORT zlibCompileFlags() # endif int ZLIB_INTERNAL z_verbose = verbose; -void ZLIB_INTERNAL z_error( - char *m) -{ +void ZLIB_INTERNAL z_error(char *m) { fprintf(stderr, "%s\n", m); exit(1); } @@ -134,9 +130,7 @@ void ZLIB_INTERNAL z_error( /* exported to allow conversion of error code to string for compress() and * uncompress() */ -const char * ZEXPORT zError( - int err) -{ +const char * ZEXPORT zError(int err) { return ERR_MSG(err); } @@ -152,11 +146,7 @@ const char * ZEXPORT zError( #ifndef HAVE_MEMCPY -void ZLIB_INTERNAL zmemcpy( - Bytef* dest, - const Bytef* source, - uInt len) -{ +void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) { if (len == 0) return; do { *dest++ = *source++; /* ??? to be unrolled */ @@ -164,12 +154,7 @@ void ZLIB_INTERNAL zmemcpy( } #ifndef Z_FREETYPE - -int ZLIB_INTERNAL zmemcmp( - const Bytef* s1, - const Bytef* s2, - uInt len) -{ +int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) { uInt j; for (j = 0; j < len; j++) { @@ -178,10 +163,7 @@ int ZLIB_INTERNAL zmemcmp( return 0; } -void ZLIB_INTERNAL zmemzero( - Bytef* dest, - uInt len) -{ +void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) { if (len == 0) return; do { *dest++ = 0; /* ??? to be unrolled */ @@ -223,8 +205,7 @@ local ptr_table table[MAX_PTR]; * a protected system like OS/2. Use Microsoft C instead. */ -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { voidpf buf; ulg bsize = (ulg)items*size; @@ -249,8 +230,7 @@ voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) return buf; } -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { int n; (void)opaque; @@ -286,14 +266,12 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) { (void)opaque; return _halloc((long)items, size); } -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { (void)opaque; _hfree(ptr); } @@ -306,25 +284,18 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) #ifndef MY_ZCALLOC /* Any system without a special alloc function */ #ifndef STDC -extern voidp malloc OF((uInt size)); -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); +extern voidp malloc(uInt size); +extern voidp calloc(uInt items, uInt size); +extern void free(voidpf ptr); #endif -voidpf ZLIB_INTERNAL zcalloc( - voidpf opaque, - unsigned items, - unsigned size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { (void)opaque; return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : (voidpf)calloc(items, size); } -void ZLIB_INTERNAL zcfree( - voidpf opaque, - voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { (void)opaque; free(ptr); } diff --git a/src/gzip/zutil.h b/src/gzip/zutil.h index 055ba8b62..a2c046a1f 100644 --- a/src/gzip/zutil.h +++ b/src/gzip/zutil.h @@ -56,7 +56,7 @@ typedef unsigned long ulg; #ifndef Z_FREETYPE extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ -#endif /* !Z_FREETYPE */ +#endif #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] @@ -195,9 +195,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* provide prototypes for these when building zlib without LFS */ #if !defined(_WIN32) && \ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); #endif #endif /* !Z_FREETYPE */ @@ -238,16 +238,16 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) ft_memset(dest, 0, len) # endif #else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); + void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len); + int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len); + void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len); #endif /* Diagnostic functions */ #ifdef ZLIB_DEBUG # include extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((char *m)); + extern void ZLIB_INTERNAL z_error(char *m); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} @@ -264,9 +264,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif #ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); + voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, + unsigned size); + void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr); #endif #define ZALLOC(strm, items, size) \ From c46c4b8e79170e8a68267164845c04ce52191126 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 29 Aug 2023 17:52:06 +0000 Subject: [PATCH 004/191] * src/sfnt/ttpost.c (load_format_20): Permit long names. Fixes #1254. --- src/sfnt/ttpost.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index 1dfad4298..cc02c6d55 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -224,11 +224,9 @@ FT_UInt len = strings[p]; - if ( len > 63U ) - { - error = FT_THROW( Invalid_File_Format ); - goto Fail; - } + FT_TRACE4(( len < 40U ? "" + : "load_format_20: %u-byte name found\n", + len )); strings[p] = 0; name_strings[n] = strings + p + 1; From 2f7abe4838d14df1c0681167a10fc3d4609a44b6 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 29 Aug 2023 19:18:43 +0000 Subject: [PATCH 005/191] Comment added. --- src/sfnt/ttpost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index cc02c6d55..03fd3d663 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -224,6 +224,7 @@ FT_UInt len = strings[p]; + /* accept but report names longer than the AGL max */ FT_TRACE4(( len < 40U ? "" : "load_format_20: %u-byte name found\n", len )); From dd1ced4ee37b375686a1e0fb6e3a6966b195f4ab Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 30 Aug 2023 02:28:48 +0000 Subject: [PATCH 006/191] [builds] Abbreviate the DLG submodule update. * autogen.sh, builds/toplevel.mk: Revise the command options. --- autogen.sh | 3 +-- builds/toplevel.mk | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index ff5e46f0d..649c644a4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -190,8 +190,7 @@ if test -e ".git"; then : else echo "Checking out submodule in \`subprojects/dlg':" - git submodule init - git submodule update + git submodule update --init fi copy_submodule_files diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 8d5063ebb..ce7cc9c7f 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -170,8 +170,7 @@ endif # test check_platform check_out_submodule: $(info Checking out submodule in `subprojects/dlg') - git --git-dir=$(TOP_DIR) submodule init - git --git-dir=$(TOP_DIR) submodule update + git -C $(TOP_DIR) submodule update --init copy_submodule: $(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg') From 000b26a30fe2229e6763752adfe1a7dab0ef21de Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 30 Aug 2023 23:03:02 -0400 Subject: [PATCH 007/191] * src/sfnt/ttpost.c (load_format_20): Rework tracing. --- src/sfnt/ttpost.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index 03fd3d663..bd0e24370 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -224,10 +224,9 @@ FT_UInt len = strings[p]; - /* accept but report names longer than the AGL max */ - FT_TRACE4(( len < 40U ? "" - : "load_format_20: %u-byte name found\n", - len )); + /* all names in Adobe Glyph List are shorter than 40 characters */ + if ( len >= 40U ) + FT_TRACE4(( "load_format_20: unusual %u-char name found\n", len )); strings[p] = 0; name_strings[n] = strings + p + 1; From ad201739425accfffd181797bc808dc78fa89d5c Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 4 Sep 2023 19:22:43 +0200 Subject: [PATCH 008/191] [autofit] Fix typos. This also reduces the used heap size by a large factor. From Behdad. * src/autofit/afcjk.h (AF_CJKAxisRec): Use `AF_BLUE_STRINGSET_MAX_LEN`. * src/autofit/aflatin.h (AF_LatinAxisRec): Ditto. --- src/autofit/afcjk.h | 2 +- src/autofit/aflatin.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h index f380ef6e0..20dad4d72 100644 --- a/src/autofit/afcjk.h +++ b/src/autofit/afcjk.h @@ -84,7 +84,7 @@ FT_BEGIN_HEADER /* used for horizontal metrics too for CJK */ FT_Bool control_overshoot; FT_UInt blue_count; - AF_CJKBlueRec blues[AF_BLUE_STRINGSET_MAX]; + AF_CJKBlueRec blues[AF_BLUE_STRINGSET_MAX_LEN]; FT_Fixed org_scale; FT_Pos org_delta; diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h index 31aa91d3b..22435d5a0 100644 --- a/src/autofit/aflatin.h +++ b/src/autofit/aflatin.h @@ -98,7 +98,7 @@ FT_BEGIN_HEADER /* ignored for horizontal metrics */ FT_UInt blue_count; - AF_LatinBlueRec blues[AF_BLUE_STRINGSET_MAX]; + AF_LatinBlueRec blues[AF_BLUE_STRINGSET_MAX_LEN]; FT_Fixed org_scale; FT_Pos org_delta; From 45903920b984540bb629bc89f4c010159c23a89a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 5 Sep 2023 08:07:17 +0200 Subject: [PATCH 009/191] [autofit] Fix synchronization mistake between FreeType and ttfautohint. Found by Behdad. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix array size of `blue_sorted`: FreeType doesn't have artificial blue zones. --- src/autofit/aflatin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index b86367aa9..80b1ad7d6 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -981,7 +981,7 @@ /* `ref' and `shoot' values of two blue zones must not overlap */ FT_UInt i; - AF_LatinBlue blue_sorted[AF_BLUE_STRINGSET_MAX_LEN + 2]; + AF_LatinBlue blue_sorted[AF_BLUE_STRINGSET_MAX_LEN]; for ( i = 0; i < axis->blue_count; i++ ) From 4904d1eb1bbc4cb173fe382a679f2778a39703e4 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 6 Sep 2023 22:58:46 -0400 Subject: [PATCH 010/191] * src/sfnt/ttpost.c (load_format_20): Micro-optimize. --- src/sfnt/ttpost.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index bd0e24370..f2aeae233 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -204,8 +204,8 @@ /* now load the name strings */ if ( num_names ) { - FT_ULong p; - FT_Byte* strings; + FT_Byte* p; + FT_Byte* p_end; post_len -= (FT_ULong)num_glyphs * 2; @@ -214,25 +214,27 @@ post_len + 1 ) ) goto Fail; - strings = (FT_Byte*)( name_strings + num_names ); - if ( FT_STREAM_READ( strings, post_len ) ) + p = (FT_Byte*)( name_strings + num_names ); + if ( FT_STREAM_READ( p, post_len ) ) goto Fail; + p_end = p + post_len; + /* convert from Pascal- to C-strings and set pointers */ - for ( p = 0, n = 0; p < post_len && n < num_names; n++ ) + for ( n = 0; p < p_end && n < num_names; n++ ) { - FT_UInt len = strings[p]; + FT_UInt len = *p; /* all names in Adobe Glyph List are shorter than 40 characters */ if ( len >= 40U ) FT_TRACE4(( "load_format_20: unusual %u-char name found\n", len )); - strings[p] = 0; - name_strings[n] = strings + p + 1; - p += len + 1; + *p++ = 0; + name_strings[n] = p; + p += len; } - strings[post_len] = 0; + *p_end = 0; /* deal with missing or insufficient string data */ if ( n < num_names ) @@ -241,7 +243,7 @@ num_names - n )); for ( ; n < num_names; n++ ) - name_strings[n] = strings + post_len; + name_strings[n] = p_end; } } From 9c51e21e53e5a97e287b450b1784c3a0979603f0 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 7 Sep 2023 23:50:35 -0400 Subject: [PATCH 011/191] [cff, truetype] Improve prefix and suffix removal. * src/cff/cffobjs.c (remove_style): Rewrite using pointers. (remove_subset_prefix): Unwrap loop and use `memmove`. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag): Unwrap loop and avoid `strlen`. --- src/cff/cffobjs.c | 79 +++++++++++++------------------------------ src/truetype/ttobjs.c | 24 +++++++------ 2 files changed, 37 insertions(+), 66 deletions(-) diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index 6d08620c4..4b710745f 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -421,32 +421,23 @@ static void remove_subset_prefix( FT_String* name ) { - FT_Int32 idx = 0; - FT_Int32 length = (FT_Int32)ft_strlen( name ) + 1; - FT_Bool continue_search = 1; + FT_UInt32 i = 0, idx = 0; - while ( continue_search ) + /* six ASCII uppercase letters followed by a plus sign */ + while ( 'A' <= name[i] && name[i++] <= 'Z' && + 'A' <= name[i] && name[i++] <= 'Z' && + 'A' <= name[i] && name[i++] <= 'Z' && + 'A' <= name[i] && name[i++] <= 'Z' && + 'A' <= name[i] && name[i++] <= 'Z' && + 'A' <= name[i] && name[i++] <= 'Z' && + name[i++] == '+' ) { - if ( length >= 7 && name[6] == '+' ) - { - for ( idx = 0; idx < 6; idx++ ) - { - /* ASCII uppercase letters */ - if ( !( 'A' <= name[idx] && name[idx] <= 'Z' ) ) - continue_search = 0; - } - - if ( continue_search ) - { - for ( idx = 7; idx < length; idx++ ) - name[idx - 7] = name[idx]; - length -= 7; - } - } - else - continue_search = 0; + idx = i; } + + if ( idx ) + FT_MEM_MOVE( name, name + idx, ft_strlen( name + idx ) + 1 ); } @@ -456,42 +447,20 @@ remove_style( FT_String* family_name, const FT_String* style_name ) { - FT_Int32 family_name_length, style_name_length; + FT_String* f = family_name + ft_strlen( family_name ); + const FT_String* s = style_name + ft_strlen( style_name ); - family_name_length = (FT_Int32)ft_strlen( family_name ); - style_name_length = (FT_Int32)ft_strlen( style_name ); + /* compare strings moving backwards */ + while ( s > style_name ) + if ( f == family_name || *--s != *--f ) + return; - if ( family_name_length > style_name_length ) - { - FT_Int idx; - - - for ( idx = 1; idx <= style_name_length; idx++ ) - { - if ( family_name[family_name_length - idx] != - style_name[style_name_length - idx] ) - break; - } - - if ( idx > style_name_length ) - { - /* family_name ends with style_name; remove it */ - idx = family_name_length - style_name_length - 1; - - /* also remove special characters */ - /* between real family name and style */ - while ( idx > 0 && - ( family_name[idx] == '-' || - family_name[idx] == ' ' || - family_name[idx] == '_' || - family_name[idx] == '+' ) ) - idx--; - - if ( idx > 0 ) - family_name[idx + 1] = '\0'; - } - } + /* terminate and remove special characters */ + do + *f = '\0'; + while ( f-- > family_name && + ( *f == '-' || *f == ' ' || *f == '_' || *f == '+' ) ); } diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 5b56af711..9126f9eab 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -152,18 +152,20 @@ static const FT_String* tt_skip_pdffont_random_tag( const FT_String* name ) { - unsigned int i; - - - if ( ft_strlen( name ) < 8 || name[6] != '+' ) - return name; - - for ( i = 0; i < 6; i++ ) - if ( !ft_isupper( name[i] ) ) - return name; + if ( ft_isupper( name[0] ) && + ft_isupper( name[1] ) && + ft_isupper( name[2] ) && + ft_isupper( name[3] ) && + ft_isupper( name[4] ) && + ft_isupper( name[5] ) && + '+' == name[6] && + name[7] ) + { + FT_TRACE7(( "name without randomization tag: %s\n", name + 7 )); + return name + 7; + } - FT_TRACE7(( "name without randomization tag: %s\n", name + 7 )); - return name + 7; + return name; } From 68f1b93247b62dbee7979f4c1429fe4c645fb5c1 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 8 Sep 2023 16:23:05 +0000 Subject: [PATCH 012/191] * src/type1/t1driver.c (t1_ps_get_font_value): Avoid redundant null. --- src/type1/t1driver.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c index a4cdf372a..ec63904ed 100644 --- a/src/type1/t1driver.c +++ b/src/type1/t1driver.c @@ -312,10 +312,7 @@ { retval = ft_strlen( type1->glyph_names[idx] ) + 1; if ( value && value_len >= retval ) - { ft_memcpy( value, (void *)( type1->glyph_names[idx] ), retval ); - ((FT_Char *)value)[retval - 1] = (FT_Char)'\0'; - } } break; @@ -344,11 +341,8 @@ { retval = ft_strlen( type1->encoding.char_name[idx] ) + 1; if ( value && value_len >= retval ) - { ft_memcpy( value, (void *)( type1->encoding.char_name[idx] ), - retval - 1 ); - ((FT_Char *)value)[retval - 1] = (FT_Char)'\0'; - } + retval ); } break; From 8ed6d97446f2f3e5523da62eefbbf32ef7c1290e Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 9 Sep 2023 15:13:55 -0400 Subject: [PATCH 013/191] * src/type1/t1afm.c (t1_get_index): Avoid `strlen` call. Instead, we check the terminal zero. --- src/type1/t1afm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index d9b9398b0..219e81a7b 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -69,8 +69,8 @@ if ( gname && gname[0] == name[0] && - ft_strlen( gname ) == len && - ft_strncmp( gname, name, len ) == 0 ) + ft_strncmp( gname, name, len ) == 0 && + gname[len] == 0 ) return n; } From 7ad9d57c3bc1d67d5cd4cee1d1d76537c1f18300 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 9 Sep 2023 15:19:06 -0400 Subject: [PATCH 014/191] [type1, cid, type42] Streamline dictionary parsing. When matching the keywords, we avoid calculating their lengths by checking the stored values. This itself is a sufficient pre-check before diving into `memcmp`. Therefore, we remove explicit check of the first characters. * include/freetype/internal/psaux.h (T1_FieldRec): Store length. * src/cid/cidload.c (cid_parse_dict): Use `memcmp` and stored length. * src/type1/t1load.c (parse_dict): Ditto. * src/type42/t42parse.c (t42_parse_dict): Ditto. --- include/freetype/internal/psaux.h | 5 +++++ src/cid/cidload.c | 28 +++++++++------------------- src/type1/t1load.c | 5 ++--- src/type42/t42parse.c | 5 ++--- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index dfb1987f8..d2dabc7fe 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -249,6 +249,7 @@ FT_BEGIN_HEADER /* structure type used to model object fields */ typedef struct T1_FieldRec_ { + FT_UInt len; /* field identifier length */ const char* ident; /* field identifier */ T1_FieldLocation location; T1_FieldType type; /* type of field */ @@ -273,6 +274,7 @@ FT_BEGIN_HEADER #define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \ { \ + sizeof ( _ident ) - 1, \ _ident, T1CODE, _type, \ 0, \ FT_FIELD_OFFSET( _fname ), \ @@ -283,6 +285,7 @@ FT_BEGIN_HEADER #define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \ { \ + sizeof ( _ident ) - 1, \ _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \ (T1_Field_ParseFunc)_reader, \ 0, 0, \ @@ -292,6 +295,7 @@ FT_BEGIN_HEADER #define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \ { \ + sizeof ( _ident ) - 1, \ _ident, T1CODE, _type, \ 0, \ FT_FIELD_OFFSET( _fname ), \ @@ -303,6 +307,7 @@ FT_BEGIN_HEADER #define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \ { \ + sizeof ( _ident ) - 1, \ _ident, T1CODE, _type, \ 0, \ FT_FIELD_OFFSET( _fname ), \ diff --git a/src/cid/cidload.c b/src/cid/cidload.c index a7da8ea39..f54fd7544 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -478,26 +478,16 @@ if ( !name ) break; - if ( cur[0] == name[0] && - len == ft_strlen( (const char*)name ) ) + if ( keyword->len == len && + ft_memcmp( cur, name, len ) == 0 ) { - FT_UInt n; - - - for ( n = 1; n < len; n++ ) - if ( cur[n] != name[n] ) - break; - - if ( n >= len ) - { - /* we found it - run the parsing callback */ - parser->root.error = cid_load_keyword( face, - loader, - keyword ); - if ( parser->root.error ) - return parser->root.error; - break; - } + /* we found it - run the parsing callback */ + parser->root.error = cid_load_keyword( face, + loader, + keyword ); + if ( parser->root.error ) + return parser->root.error; + break; } keyword++; } diff --git a/src/type1/t1load.c b/src/type1/t1load.c index be7cd0fd5..fb685ff26 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -2401,9 +2401,8 @@ if ( !name ) break; - if ( cur[0] == name[0] && - len == ft_strlen( (const char *)name ) && - ft_memcmp( cur, name, len ) == 0 ) + if ( keyword->len == len && + ft_memcmp( cur, name, len ) == 0 ) { /* We found it -- run the parsing callback! */ /* We record every instance of every field */ diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index f96a43b14..fa165b7b9 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -1288,9 +1288,8 @@ if ( !name ) continue; - if ( cur[0] == name[0] && - len == ft_strlen( (const char *)name ) && - ft_memcmp( cur, name, len ) == 0 ) + if ( keyword->len == len && + ft_memcmp( cur, name, len ) == 0 ) { /* we found it -- run the parsing callback! */ parser->root.error = t42_load_keyword( face, From 3302e2f60cc377238ae98d8f2ea266eeea603b92 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 9 Sep 2023 17:24:34 -0400 Subject: [PATCH 015/191] Update forgotten array termini. * src/cid/cidload.c (cid_field_records): Account for added `len`. * src/type1/t1load.c (t1_keywords): Ditto. * src/type42/t42parse.c (t42_keywords): Ditto. --- src/cid/cidload.c | 2 +- src/type1/t1load.c | 2 +- src/type42/t42parse.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cid/cidload.c b/src/cid/cidload.c index f54fd7544..356673a61 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -388,7 +388,7 @@ T1_FIELD_CALLBACK( "ExpansionFactor", parse_expansion_factor, 0 ) T1_FIELD_CALLBACK( "FontName", parse_font_name, 0 ) - { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 } + { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } }; diff --git a/src/type1/t1load.c b/src/type1/t1load.c index fb685ff26..6a2d2801d 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -2284,7 +2284,7 @@ T1_FIELD_DICT_PRIVATE ) #endif - { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 } + { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } }; diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index fa165b7b9..71654c7b3 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -99,7 +99,7 @@ T1_FIELD_CALLBACK( "CharStrings", t42_parse_charstrings, 0 ) T1_FIELD_CALLBACK( "sfnts", t42_parse_sfnts, 0 ) - { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 } + { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } }; From 8d0897b37d11b93d5518e3e28846c8ad679b77c9 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 9 Sep 2023 22:20:00 -0400 Subject: [PATCH 016/191] [type1, cid, type42] Post-cleanup. * include/freetype/internal/psaux.h (T1_FIELD_ZERO): Terminating macro. * src/cid/cidload.c (cid_parse_dict): Use while-loop. * src/type1/t1load.c (parse_dict): Ditto. * src/type42/t42parse.c (t42_parse_dict): Ditto. --- include/freetype/internal/psaux.h | 8 +++++--- src/cid/cidload.c | 11 ++++------- src/type1/t1load.c | 10 +++------- src/type42/t42parse.c | 15 ++++++--------- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index d2dabc7fe..76cbebdba 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -276,7 +276,7 @@ FT_BEGIN_HEADER { \ sizeof ( _ident ) - 1, \ _ident, T1CODE, _type, \ - 0, \ + NULL, \ FT_FIELD_OFFSET( _fname ), \ FT_FIELD_SIZE( _fname ), \ 0, 0, \ @@ -297,7 +297,7 @@ FT_BEGIN_HEADER { \ sizeof ( _ident ) - 1, \ _ident, T1CODE, _type, \ - 0, \ + NULL, \ FT_FIELD_OFFSET( _fname ), \ FT_FIELD_SIZE_DELTA( _fname ), \ _max, \ @@ -309,7 +309,7 @@ FT_BEGIN_HEADER { \ sizeof ( _ident ) - 1, \ _ident, T1CODE, _type, \ - 0, \ + NULL, \ FT_FIELD_OFFSET( _fname ), \ FT_FIELD_SIZE_DELTA( _fname ), \ _max, 0, \ @@ -359,6 +359,8 @@ FT_BEGIN_HEADER #define T1_FIELD_CALLBACK( _ident, _name, _dict ) \ T1_NEW_CALLBACK_FIELD( _ident, _name, _dict ) +#define T1_FIELD_ZERO { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } + /*************************************************************************/ /*************************************************************************/ diff --git a/src/cid/cidload.c b/src/cid/cidload.c index 356673a61..7984a45f9 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -388,7 +388,7 @@ T1_FIELD_CALLBACK( "ExpansionFactor", parse_expansion_factor, 0 ) T1_FIELD_CALLBACK( "FontName", parse_font_name, 0 ) - { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } + T1_FIELD_ZERO }; @@ -469,15 +469,11 @@ T1_Field keyword = (T1_Field)cid_field_records; - for (;;) + while ( keyword->len ) { - FT_Byte* name; + FT_Byte* name = (FT_Byte*)keyword->ident; - name = (FT_Byte*)keyword->ident; - if ( !name ) - break; - if ( keyword->len == len && ft_memcmp( cur, name, len ) == 0 ) { @@ -489,6 +485,7 @@ return parser->root.error; break; } + keyword++; } } diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 6a2d2801d..5acd52a47 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -2284,7 +2284,7 @@ T1_FIELD_DICT_PRIVATE ) #endif - { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } + T1_FIELD_ZERO }; @@ -2392,15 +2392,11 @@ T1_Field keyword = (T1_Field)t1_keywords; - for (;;) + while ( keyword->len ) { - FT_Byte* name; + FT_Byte* name = (FT_Byte*)keyword->ident; - name = (FT_Byte*)keyword->ident; - if ( !name ) - break; - if ( keyword->len == len && ft_memcmp( cur, name, len ) == 0 ) { diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index 71654c7b3..889bd1803 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -99,7 +99,7 @@ T1_FIELD_CALLBACK( "CharStrings", t42_parse_charstrings, 0 ) T1_FIELD_CALLBACK( "sfnts", t42_parse_sfnts, 0 ) - { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } + T1_FIELD_ZERO }; @@ -1195,8 +1195,6 @@ { T42_Parser parser = &loader->parser; FT_Byte* limit; - FT_Int n_keywords = (FT_Int)( sizeof ( t42_keywords ) / - sizeof ( t42_keywords[0] ) ); parser->root.cursor = base; @@ -1273,16 +1271,13 @@ if ( len > 0 && len < 22 && parser->root.cursor < limit ) { - int i; + T1_Field keyword = (T1_Field)t42_keywords; /* now compare the immediate name to the keyword table */ - - /* loop through all known keywords */ - for ( i = 0; i < n_keywords; i++ ) + while ( keyword->len ) { - T1_Field keyword = (T1_Field)&t42_keywords[i]; - FT_Byte *name = (FT_Byte*)keyword->ident; + FT_Byte* name = (FT_Byte*)keyword->ident; if ( !name ) @@ -1299,6 +1294,8 @@ return parser->root.error; break; } + + keyword++; } } } From 446720a29e3a0615e3312b92e38eea0dabca6ea7 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 9 Sep 2023 23:01:13 -0400 Subject: [PATCH 017/191] * src/cff/cffparse.c (CFF_Field_Handler): Some s/0/NULL/. --- src/cff/cffparse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c index 3b076704c..77992ab6f 100644 --- a/src/cff/cffparse.c +++ b/src/cff/cffparse.c @@ -1064,7 +1064,7 @@ code | CFFCODE, \ FT_FIELD_OFFSET( name ), \ FT_FIELD_SIZE( name ), \ - 0, 0, 0 \ + NULL, 0, 0 \ }, #define CFF_FIELD_DELTA( code, name, max, id ) \ @@ -1073,7 +1073,7 @@ code | CFFCODE, \ FT_FIELD_OFFSET( name ), \ FT_FIELD_SIZE_DELTA( name ), \ - 0, \ + NULL, \ max, \ FT_FIELD_OFFSET( num_ ## name ) \ }, @@ -1083,7 +1083,7 @@ #include "cfftoken.h" - { 0, 0, 0, 0, 0, 0, 0 } + { 0, 0, 0, 0, NULL, 0, 0 } }; @@ -1117,7 +1117,7 @@ code | CFFCODE, \ FT_FIELD_OFFSET( name ), \ FT_FIELD_SIZE( name ), \ - 0, 0, 0, \ + NULL, 0, 0, \ id \ }, @@ -1127,7 +1127,7 @@ code | CFFCODE, \ FT_FIELD_OFFSET( name ), \ FT_FIELD_SIZE_DELTA( name ), \ - 0, \ + NULL, \ max, \ FT_FIELD_OFFSET( num_ ## name ), \ id \ @@ -1138,7 +1138,7 @@ #include "cfftoken.h" - { 0, 0, 0, 0, 0, 0, 0, 0 } + { 0, 0, 0, 0, NULL, 0, 0, NULL } }; From 17db21f3fc3821c9fff8653903c83e6a97c27241 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 10 Sep 2023 22:34:17 -0400 Subject: [PATCH 018/191] * src/type1/t1afm.c (t1_get_index): Restore `strlen` call. This reverts commit 8ed6d97446f2f3e5523da62eefbbf32ef7c1290e and fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62246 --- src/type1/t1afm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index 219e81a7b..d9b9398b0 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -69,8 +69,8 @@ if ( gname && gname[0] == name[0] && - ft_strncmp( gname, name, len ) == 0 && - gname[len] == 0 ) + ft_strlen( gname ) == len && + ft_strncmp( gname, name, len ) == 0 ) return n; } From 30b0ce730354496fe30717b5871165b77c42ac33 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 11 Sep 2023 16:34:36 +0000 Subject: [PATCH 019/191] src/psaux/psintrp.c (cf2_escSQRT): Improve initial guess. The worst number of iterations decreased from 11 to 5. --- src/psaux/psintrp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index 6c640eebd..fcd49ee0e 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -37,6 +37,7 @@ #include "psft.h" +#include #include #include @@ -2276,9 +2277,8 @@ arg = cf2_stack_popFixed( opStack ); if ( arg > 0 ) { - /* use a start value that doesn't make */ - /* the algorithm's addition overflow */ - FT_Fixed root = arg < 10 ? arg : arg >> 1; + /* initial guess based on the most significant bit */ + FT_Fixed root = 1 << ( ( 17 + FT_MSB( arg ) ) >> 1 ); FT_Fixed new_root; From 18eb93556c96fde66db57d59fe441a189dda3aee Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 11 Sep 2023 17:00:49 -0400 Subject: [PATCH 020/191] * src/psaux/cffdecode.c (cff_op_sqrt): Improve initial guess. --- src/psaux/cffdecode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c index 562d17d22..0f1cd683c 100644 --- a/src/psaux/cffdecode.c +++ b/src/psaux/cffdecode.c @@ -17,6 +17,7 @@ #include +#include #include #include #include @@ -1755,7 +1756,7 @@ args[0] = 46341; else if ( args[0] > 0 ) { - FT_Fixed root = args[0]; + FT_Fixed root = 1 << ( ( 17 + FT_MSB( args[0] ) ) >> 1 ); FT_Fixed new_root; From 7d45cf2c8f219263c5b9d84763a9a101138b0ed1 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 11 Sep 2023 20:45:16 -0400 Subject: [PATCH 021/191] * src/psaux/cffdecode.c (cff_op_sqrt): Correct upper limit. --- src/psaux/cffdecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c index 0f1cd683c..70173ccb7 100644 --- a/src/psaux/cffdecode.c +++ b/src/psaux/cffdecode.c @@ -1753,7 +1753,7 @@ /* without upper limit the loop below might not finish */ if ( args[0] > 0x7FFFFFFFL ) - args[0] = 46341; + args[0] = 0xB504F3L; /* sqrt( 32768.0 ) */ else if ( args[0] > 0 ) { FT_Fixed root = 1 << ( ( 17 + FT_MSB( args[0] ) ) >> 1 ); From 16f311d72582c117796a23e22074fe9624760ee1 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Tue, 12 Sep 2023 18:35:01 -0400 Subject: [PATCH 022/191] [base] Fix typo to correct predicate for call * src/base/ftobj.c (FT_Get_Color_Glyph_Paint): check `get_colr_glyph_paint` before calling `get_colr_glyph_paint` and not `get_colr_layer` --- src/base/ftobjs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 89a25bc73..759b95c73 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -5791,7 +5791,7 @@ ttface = (TT_Face)face; sfnt = (SFNT_Service)ttface->sfnt; - if ( sfnt->get_colr_layer ) + if ( sfnt->get_colr_glyph_paint ) return sfnt->get_colr_glyph_paint( ttface, base_glyph, root_transform, From 6eb5f2be40b1c780dab3fbff3c9f19a7339bcab3 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 13 Sep 2023 17:02:31 +0000 Subject: [PATCH 023/191] Update 2 files - /src/base/ftcalc.c - /include/freetype/internal/ftcalc.h --- include/freetype/internal/ftcalc.h | 4 ++-- src/base/ftcalc.c | 37 ++++++++++++------------------ 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index d9aea2360..fa5e4050f 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -509,8 +509,8 @@ FT_BEGIN_HEADER * @note: * This function is not very fast. */ - FT_BASE( FT_Int32 ) - FT_SqrtFixed( FT_Int32 x ); + FT_BASE( FT_UInt32 ) + FT_SqrtFixed( FT_UInt32 x ); #endif /* 0 */ diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index c5bc7e3b1..ba4d5e3fd 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -917,36 +917,29 @@ /* documentation is in ftcalc.h */ - FT_BASE_DEF( FT_Int32 ) - FT_SqrtFixed( FT_Int32 x ) + /* Algorithm and code by Christophe Meessen (1993). */ + FT_BASE_DEF( FT_UInt32 ) + FT_SqrtFixed( FT_UInt32 r ) { - FT_UInt32 root, rem_hi, rem_lo, test_div; - FT_Int count; + FT_UInt32 t, q, b; - root = 0; + q = 0; - if ( x > 0 ) + b = 0x40000000; + while ( b > 0x40 ) { - rem_hi = 0; - rem_lo = (FT_UInt32)x; - count = 24; - do + t = q + b; + if ( r >= t ) { - rem_hi = ( rem_hi << 2 ) | ( rem_lo >> 30 ); - rem_lo <<= 2; - root <<= 1; - test_div = ( root << 1 ) + 1; - - if ( rem_hi >= test_div ) - { - rem_hi -= test_div; - root += 1; - } - } while ( --count ); + r -= t; + q = t + b; /* equivalent to q += 2*b */ + } + r <<= 1; + b >>= 1; } - return (FT_Int32)root; + return q >> 8; } #endif /* 0 */ From d7b63a966bdedeb52511913bc9d7de170b213d7e Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 14 Sep 2023 13:00:07 +0000 Subject: [PATCH 024/191] * src/tools/apinames.c (read_header_file): Typos. --- src/tools/apinames.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/apinames.c b/src/tools/apinames.c index dfa258fd7..5a49b0649 100644 --- a/src/tools/apinames.c +++ b/src/tools/apinames.c @@ -10,7 +10,7 @@ * accepted if you are using GCC for compilation (and probably by * other compilers too). * - * Author: FreeType team, 2005-2019 + * Author: FreeType team, 2005-2023 * * This code is explicitly placed into the public domain. * @@ -295,7 +295,7 @@ read_header_file( FILE* file, p = buff; /* skip leading whitespace */ - while ( *p && ( *p == ' ' || *p == '\\' ) ) + while ( *p == ' ' || *p == '\t' ) p++; /* skip empty lines */ From babe6af16740f3fa3c19ef4b689f29d574c5fbc8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 18 Sep 2023 15:01:26 +0000 Subject: [PATCH 025/191] * src/base/ftcalc.c /* FT_SqrtFixed */: Fix defunct overflow. --- src/base/ftcalc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index ba4d5e3fd..0b915992a 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -917,17 +917,18 @@ /* documentation is in ftcalc.h */ - /* Algorithm and code by Christophe Meessen (1993). */ + /* Algorithm and code by Christophe Meessen (1993) */ + /* with overflow fixed. */ FT_BASE_DEF( FT_UInt32 ) - FT_SqrtFixed( FT_UInt32 r ) + FT_SqrtFixed( FT_UInt32 v ) { - FT_UInt32 t, q, b; + FT_UInt32 r = v >> 1; + FT_UInt32 q = ( v & 1 ) << 15; + FT_UInt32 b = 0x20000000; + FT_UInt32 t; - q = 0; - - b = 0x40000000; - while ( b > 0x40 ) + do { t = q + b; if ( r >= t ) @@ -938,8 +939,9 @@ r <<= 1; b >>= 1; } + while ( b > 0x20 ); - return q >> 8; + return q >> 7; } #endif /* 0 */ From 95b0fe2a6dff256b4e0670e7ee6c72dc51aac968 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 19 Sep 2023 22:26:32 -0400 Subject: [PATCH 026/191] [base] Reintroduce `FT_SqrtFixed`. The general square root calculations are not necessary in FreeType. For vector normalization or length, FreeType uses special functions. It is, however, required in the legacy CFF specifications. * src/base/ftcalc.c (FT_SqrtFixed): New function that uses either Babylonian or bit-wise algorithm, whichever is faster for the given situation. * include/freetype/internal/ftcalc.h (FT_SqrtFixed): Declare it. --- include/freetype/internal/ftcalc.h | 7 +-- src/base/ftcalc.c | 71 ++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index fa5e4050f..b987ccb20 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -489,8 +489,6 @@ FT_BEGIN_HEADER FT_Fixed y ); -#if 0 - /************************************************************************** * * @function: @@ -507,13 +505,12 @@ FT_BEGIN_HEADER * The result of 'sqrt(x)'. * * @note: - * This function is not very fast. + * This function is slow and should be avoided. Consider `FT_Hypot` or + * `FT_Vector_NormLen' instead. */ FT_BASE( FT_UInt32 ) FT_SqrtFixed( FT_UInt32 x ); -#endif /* 0 */ - #define INT_TO_F26DOT6( x ) ( (FT_Long)(x) * 64 ) /* << 6 */ #define INT_TO_F2DOT14( x ) ( (FT_Long)(x) * 16384 ) /* << 14 */ diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index 0b915992a..a5bd61491 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -913,38 +913,71 @@ } -#if 0 - /* documentation is in ftcalc.h */ - /* Algorithm and code by Christophe Meessen (1993) */ - /* with overflow fixed. */ FT_BASE_DEF( FT_UInt32 ) FT_SqrtFixed( FT_UInt32 v ) { - FT_UInt32 r = v >> 1; - FT_UInt32 q = ( v & 1 ) << 15; - FT_UInt32 b = 0x20000000; - FT_UInt32 t; + if ( v == 0 ) + return 0; +#ifndef FT_INT64 - do + /* Algorithm by Christophe Meessen (1993) with overflow fixed and */ + /* rounding added. Any unsigned fixed 16.16 argument is acceptable. */ + /* However, this algorithm is slower than the Babylonian method with */ + /* a good initial guess. We only use it for large 32-bit values when */ + /* 64-bit computations are not desirable. */ + else if ( v > 0x10000U ) { - t = q + b; - if ( r >= t ) + FT_UInt32 r = v >> 1; + FT_UInt32 q = ( v & 1 ) << 15; + FT_UInt32 b = 0x20000000; + FT_UInt32 t; + + + do { - r -= t; - q = t + b; /* equivalent to q += 2*b */ + t = q + b; + if ( r >= t ) + { + r -= t; + q = t + b; /* equivalent to q += 2*b */ + } + r <<= 1; + b >>= 1; } - r <<= 1; - b >>= 1; + while ( b > 0x10 ); /* exactly 25 cycles */ + + return ( q + 0x40 ) >> 7; } - while ( b > 0x20 ); + else + { + FT_UInt32 r = ( v << 16 ) - 1; - return q >> 7; - } +#else /* FT_INT64 */ -#endif /* 0 */ + else + { + FT_UInt64 r = ( (FT_UInt64)v << 16 ) - 1; + +#endif /* FT_INT64 */ + + FT_UInt32 q = 1 << ( ( 17 + FT_MSB( v ) ) >> 1 ); + FT_UInt32 t; + + + /* Babylonian method with rounded-up division */ + do + { + t = q; + q = ( t + (FT_UInt32)( r / t ) + 1 ) >> 1; + } + while ( q != t ); /* less than 6 cycles */ + + return q; + } + } /* documentation is in ftcalc.h */ From c4073d82517eff48458e166a6edfb0618b221a4d Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 19 Sep 2023 22:29:14 -0400 Subject: [PATCH 027/191] [psaux] Use `FT_SqrtFixed`. * src/psaux/cffdecode.c : Call `FT_SqrtFixed`. * src/psaux/psintrp.c : Ditto. --- src/psaux/cffdecode.c | 17 ++--------------- src/psaux/psintrp.c | 17 +---------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c index 70173ccb7..40bf276cf 100644 --- a/src/psaux/cffdecode.c +++ b/src/psaux/cffdecode.c @@ -1753,22 +1753,9 @@ /* without upper limit the loop below might not finish */ if ( args[0] > 0x7FFFFFFFL ) - args[0] = 0xB504F3L; /* sqrt( 32768.0 ) */ + args[0] = 0xB504F4L; /* sqrt( 32768.0044 ) */ else if ( args[0] > 0 ) - { - FT_Fixed root = 1 << ( ( 17 + FT_MSB( args[0] ) ) >> 1 ); - FT_Fixed new_root; - - - for (;;) - { - new_root = ( root + FT_DivFix( args[0], root ) + 1 ) >> 1; - if ( new_root == root ) - break; - root = new_root; - } - args[0] = new_root; - } + args[0] = (FT_Fixed)FT_SqrtFixed( args[0] ); else args[0] = 0; args++; diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index fcd49ee0e..b9d5071ee 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -2276,22 +2276,7 @@ arg = cf2_stack_popFixed( opStack ); if ( arg > 0 ) - { - /* initial guess based on the most significant bit */ - FT_Fixed root = 1 << ( ( 17 + FT_MSB( arg ) ) >> 1 ); - FT_Fixed new_root; - - - /* Babylonian method */ - for (;;) - { - new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1; - if ( new_root == root ) - break; - root = new_root; - } - arg = new_root; - } + arg = (CF2_F16Dot16)FT_SqrtFixed( arg ); else arg = 0; From cc732ec6d170057b1c6b1ead7fc131348bcd7e8f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 21 Sep 2023 02:28:32 +0000 Subject: [PATCH 028/191] * include/freetype/internal/ftcalc.h (FT_MSB): Define for Solaris 11. --- include/freetype/internal/ftcalc.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index b987ccb20..11b76fe5e 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -455,6 +455,12 @@ FT_BEGIN_HEADER #define FT_MSB( x ) FT_MSB_i386( x ) +#elif defined( __SunOS_5_11 ) + +#include + +#define FT_MSB( x ) ( fls( x ) - 1 ) + #elif defined( __DECC ) || defined( __DECCXX ) #include From 73490681a70d0beda39f063a1b492c242b9eb1a5 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 24 Sep 2023 19:39:10 -0400 Subject: [PATCH 029/191] * src/base/ftcalc.c (FT_MOVE_SIGN): Enclose assignments. --- src/base/ftcalc.c | 91 ++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 60 deletions(-) diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index a5bd61491..1ee2e8096 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -69,13 +69,15 @@ /* transfer sign, leaving a positive number; */ /* we need an unsigned value to safely negate INT_MIN (or LONG_MIN) */ -#define FT_MOVE_SIGN( x, x_unsigned, s ) \ - FT_BEGIN_STMNT \ - if ( x < 0 ) \ - { \ - x_unsigned = 0U - (x_unsigned); \ - s = -s; \ - } \ +#define FT_MOVE_SIGN( utype, x, x_unsigned, s ) \ + FT_BEGIN_STMNT \ + if ( x < 0 ) \ + { \ + x_unsigned = 0U - (utype)x; \ + s = -s; \ + } \ + else \ + x_unsigned = (utype)x; \ FT_END_STMNT /* The following three functions are available regardless of whether */ @@ -179,13 +181,9 @@ FT_Long d_; - a = (FT_UInt64)a_; - b = (FT_UInt64)b_; - c = (FT_UInt64)c_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); - FT_MOVE_SIGN( c_, c, s ); + FT_MOVE_SIGN( FT_UInt64, a_, a, s ); + FT_MOVE_SIGN( FT_UInt64, b_, b, s ); + FT_MOVE_SIGN( FT_UInt64, c_, c, s ); d = c > 0 ? ( a * b + ( c >> 1 ) ) / c : 0x7FFFFFFFUL; @@ -208,13 +206,9 @@ FT_Long d_; - a = (FT_UInt64)a_; - b = (FT_UInt64)b_; - c = (FT_UInt64)c_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); - FT_MOVE_SIGN( c_, c, s ); + FT_MOVE_SIGN( FT_UInt64, a_, a, s ); + FT_MOVE_SIGN( FT_UInt64, b_, b, s ); + FT_MOVE_SIGN( FT_UInt64, c_, c, s ); d = c > 0 ? a * b / c : 0x7FFFFFFFUL; @@ -257,11 +251,8 @@ FT_Long q_; - a = (FT_UInt64)a_; - b = (FT_UInt64)b_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); + FT_MOVE_SIGN( FT_UInt64, a_, a, s ); + FT_MOVE_SIGN( FT_UInt64, b_, b, s ); q = b > 0 ? ( ( a << 16 ) + ( b >> 1 ) ) / b : 0x7FFFFFFFUL; @@ -422,13 +413,9 @@ /* XXX: this function does not allow 64-bit arguments */ - a = (FT_UInt32)a_; - b = (FT_UInt32)b_; - c = (FT_UInt32)c_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); - FT_MOVE_SIGN( c_, c, s ); + FT_MOVE_SIGN( FT_UInt32, a_, a, s ); + FT_MOVE_SIGN( FT_UInt32, b_, b, s ); + FT_MOVE_SIGN( FT_UInt32, c_, c, s ); if ( c == 0 ) a = 0x7FFFFFFFUL; @@ -470,13 +457,9 @@ /* XXX: this function does not allow 64-bit arguments */ - a = (FT_UInt32)a_; - b = (FT_UInt32)b_; - c = (FT_UInt32)c_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); - FT_MOVE_SIGN( c_, c, s ); + FT_MOVE_SIGN( FT_UInt32, a_, a, s ); + FT_MOVE_SIGN( FT_UInt32, b_, b, s ); + FT_MOVE_SIGN( FT_UInt32, c_, c, s ); if ( c == 0 ) a = 0x7FFFFFFFUL; @@ -575,11 +558,8 @@ /* XXX: this function does not allow 64-bit arguments */ - a = (FT_UInt32)a_; - b = (FT_UInt32)b_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); + FT_MOVE_SIGN( FT_UInt32, a_, a, s ); + FT_MOVE_SIGN( FT_UInt32, b_, b, s ); if ( a + ( b >> 8 ) <= 8190UL ) a = ( a * b + 0x8000UL ) >> 16; @@ -614,11 +594,8 @@ /* XXX: this function does not allow 64-bit arguments */ - a = (FT_UInt32)a_; - b = (FT_UInt32)b_; - - FT_MOVE_SIGN( a_, a, s ); - FT_MOVE_SIGN( b_, b, s ); + FT_MOVE_SIGN( FT_UInt32, a_, a, s ); + FT_MOVE_SIGN( FT_UInt32, b_, b, s ); if ( b == 0 ) { @@ -829,11 +806,8 @@ FT_Int sx = 1, sy = 1, shift; - x = (FT_UInt32)x_; - y = (FT_UInt32)y_; - - FT_MOVE_SIGN( x_, x, sx ); - FT_MOVE_SIGN( y_, y, sy ); + FT_MOVE_SIGN( FT_UInt32, x_, x, sx ); + FT_MOVE_SIGN( FT_UInt32, y_, y, sy ); /* trivial cases */ if ( x == 0 ) @@ -1122,11 +1096,8 @@ FT_UInt32 factor; - scalar = (FT_UInt32)s[i]; - factor = (FT_UInt32)f[i]; - - FT_MOVE_SIGN( s[i], scalar, sign ); - FT_MOVE_SIGN( f[i], factor, sign ); + FT_MOVE_SIGN( FT_UInt32, s[i], scalar, sign ); + FT_MOVE_SIGN( FT_UInt32, f[i], factor, sign ); ft_multo64( scalar, factor, &multResult ); From 49781ab72b2dfd0f78172023921d08d08f323ade Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 24 Sep 2023 20:09:17 -0400 Subject: [PATCH 030/191] Comment typos. --- src/base/ftstream.c | 2 +- src/truetype/ttgload.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/ftstream.c b/src/base/ftstream.c index 64826aceb..80ba6cd5e 100644 --- a/src/base/ftstream.c +++ b/src/base/ftstream.c @@ -830,7 +830,7 @@ goto Exit; } - /* now, compute the signed value is necessary */ + /* now, compute the signed value if necessary */ if ( fields->value & FT_FRAME_OP_SIGNED ) value = (FT_ULong)( (FT_Int32)( value << sign_shift ) >> sign_shift ); diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index dc427e8a1..c7468ec99 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -2313,7 +2313,7 @@ * * 1) we have a `tricky' font that heavily relies on the interpreter to * render glyphs correctly, for example DFKai-SB, or - * 2) FT_RENDER_MODE_MONO (i.e, monochome rendering) is requested. + * 2) FT_RENDER_MODE_MONO (i.e, monochrome rendering) is requested. * * In those cases, backward compatibility needs to be turned off to get * correct rendering. The rendering is then completely up to the From e0e5b838e508aa4043c0e27d8403ab7be2a46153 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 25 Sep 2023 22:26:15 -0400 Subject: [PATCH 031/191] * src/gxvalid/gxvcommn.h (GXV_USHORT_TO_SHORT): Removed. --- src/gxvalid/gxvcommn.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h index f88d23a41..52cb6c408 100644 --- a/src/gxvalid/gxvcommn.h +++ b/src/gxvalid/gxvcommn.h @@ -516,9 +516,6 @@ FT_BEGIN_HEADER FT_INVALID_TOO_SHORT; \ FT_END_STMNT -#define GXV_USHORT_TO_SHORT( _us ) \ - ( ( 0x8000U < ( _us ) ) ? ( ( _us ) - 0x8000U ) : ( _us ) ) - #define GXV_STATETABLE_HEADER_SIZE ( 2 + 2 + 2 + 2 ) #define GXV_STATEHEADER_SIZE GXV_STATETABLE_HEADER_SIZE From 7b308a29dd105074eea9c8d5953a182d325f74f1 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 28 Sep 2023 22:56:15 -0400 Subject: [PATCH 032/191] * src/smooth/ftgrays.c (gray_render_conic) [SSE2]: Improve flow. --- src/smooth/ftgrays.c | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 0918272f8..fbf1541ef 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1095,16 +1095,17 @@ typedef ptrdiff_t FT_PtrDist; return; } - /* We can calculate the number of necessary bisections because */ + /* We can calculate the number of necessary segments because */ /* each bisection predictably reduces deviation exactly 4-fold. */ /* Even 32-bit deviation would vanish after 16 bisections. */ - shift = 0; + shift = 16; do { - dx >>= 2; - shift += 1; + dx >>= 2; + shift--; } while ( dx > ONE_PIXEL / 4 ); + count = 0x10000U >> shift; /* * The (P0,P1,P2) arc equation, for t in [0,1] range: @@ -1151,9 +1152,8 @@ typedef ptrdiff_t FT_PtrDist; */ #if FT_SSE2 - /* Experience shows that for small shift values, */ - /* SSE2 is actually slower. */ - if ( shift > 2 ) + /* Experience shows that for small counts, SSE2 is actually slower. */ + if ( count > 4 ) { union { @@ -1169,9 +1169,7 @@ typedef ptrdiff_t FT_PtrDist; } v; - __m128i a, b; - __m128i r, q, q2; - __m128i p; + __m128i p, q, r; u.i.ax = ax; @@ -1179,14 +1177,13 @@ typedef ptrdiff_t FT_PtrDist; u.i.bx = bx; u.i.by = by; - a = _mm_load_si128( &u.vec.a ); - b = _mm_load_si128( &u.vec.b ); + q = _mm_load_si128( &u.vec.b ); + r = _mm_load_si128( &u.vec.a ); - r = _mm_slli_epi64( a, 33 - 2 * shift ); - q = _mm_slli_epi64( b, 33 - shift ); - q2 = _mm_slli_epi64( a, 32 - 2 * shift ); - - q = _mm_add_epi64( q2, q ); + q = _mm_slli_epi64( q, shift + 17); + r = _mm_slli_epi64( r, shift + shift ); + q = _mm_add_epi64( q, r ); + r = _mm_add_epi64( r, r ); v.i.px_lo = 0; v.i.px_hi = p0.x; @@ -1195,7 +1192,7 @@ typedef ptrdiff_t FT_PtrDist; p = _mm_load_si128( &v.vec ); - for ( count = 1U << shift; count > 0; count-- ) + do { p = _mm_add_epi64( p, q ); q = _mm_add_epi64( q, r ); @@ -1203,22 +1200,25 @@ typedef ptrdiff_t FT_PtrDist; _mm_store_si128( &v.vec, p ); gray_render_line( RAS_VAR_ v.i.px_hi, v.i.py_hi ); - } + } while ( --count ); return; } #endif /* FT_SSE2 */ - rx = LEFT_SHIFT( ax, 33 - 2 * shift ); - ry = LEFT_SHIFT( ay, 33 - 2 * shift ); + rx = LEFT_SHIFT( ax, shift + shift ); + ry = LEFT_SHIFT( ay, shift + shift ); + + qx = LEFT_SHIFT( bx, shift + 17 ) + rx; + qy = LEFT_SHIFT( by, shift + 17 ) + ry; - qx = LEFT_SHIFT( bx, 33 - shift ) + LEFT_SHIFT( ax, 32 - 2 * shift ); - qy = LEFT_SHIFT( by, 33 - shift ) + LEFT_SHIFT( ay, 32 - 2 * shift ); + rx *= 2; + ry *= 2; px = LEFT_SHIFT( p0.x, 32 ); py = LEFT_SHIFT( p0.y, 32 ); - for ( count = 1U << shift; count > 0; count-- ) + do { px += qx; py += qy; @@ -1227,7 +1227,7 @@ typedef ptrdiff_t FT_PtrDist; gray_render_line( RAS_VAR_ (FT_Pos)( px >> 32 ), (FT_Pos)( py >> 32 ) ); - } + } while ( --count ); } #else /* !BEZIER_USE_DDA */ From 21435f07def97bf1b3b82830689c7398a7dce7ca Mon Sep 17 00:00:00 2001 From: Zachary Zollman Date: Sun, 8 Oct 2023 23:34:28 +0000 Subject: [PATCH 033/191] fix typo in FT_Outline_Decompose note --- include/freetype/ftoutln.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h index f9329ca40..f2fa8e6e0 100644 --- a/include/freetype/ftoutln.h +++ b/include/freetype/ftoutln.h @@ -112,7 +112,7 @@ FT_BEGIN_HEADER * Degenerate contours, segments, and Bezier arcs may be reported. In * most cases, it is best to filter these out before using the outline * for stroking or other path modification purposes (which may cause - * degenerate segments to become non-degenrate and visible, like when + * degenerate segments to become non-degenerate and visible, like when * stroke caps are used or the path is otherwise outset). Some glyph * outlines may contain deliberate degenerate single points for mark * attachement. From 84cd2e98975f8406b1db20e1088f5969419b0fd8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 9 Oct 2023 22:11:41 -0400 Subject: [PATCH 034/191] * src/raster/ftraster.c: Tracing updates. --- src/raster/ftraster.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 192ca0701..0b89396be 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -645,13 +645,13 @@ if ( overshoot ) ras.cProfile->flags |= Overshoot_Bottom; - FT_TRACE6(( " new ascending profile = %p\n", (void *)ras.cProfile )); + FT_TRACE7(( " new ascending profile = %p\n", (void *)ras.cProfile )); break; case Descending_State: if ( overshoot ) ras.cProfile->flags |= Overshoot_Top; - FT_TRACE6(( " new descending profile = %p\n", (void *)ras.cProfile )); + FT_TRACE7(( " new descending profile = %p\n", (void *)ras.cProfile )); break; default: @@ -707,7 +707,7 @@ PProfile oldProfile; - FT_TRACE6(( " ending profile %p, start = %ld, height = %ld\n", + FT_TRACE7(( " ending profile %p, start = %ld, height = %ld\n", (void *)ras.cProfile, ras.cProfile->start, h )); ras.cProfile->height = h; @@ -3038,6 +3038,9 @@ if ( y_min == y_max ) return ras.error; /* still Raster_Overflow */ + FT_TRACE6(( "band [%d..%d]: to be bisected\n", + y_min, y_max )); + y_mid = ( y_min + y_max ) >> 1; band_stack[band_top++] = y_min; @@ -3045,6 +3048,9 @@ } else { + FT_TRACE6(( "band [%d..%d]: %td bytes remaining\n", + y_min, y_max, (char*)ras.maxBuff - (char*)ras.top )); + if ( ras.fProfile ) if ( Draw_Sweep( RAS_VAR ) ) return ras.error; @@ -3095,7 +3101,7 @@ } /* Vertical Sweep */ - FT_TRACE7(( "Vertical pass (ftraster)\n" )); + FT_TRACE6(( "Vertical pass (ftraster)\n" )); ras.Proc_Sweep_Init = Vertical_Sweep_Init; ras.Proc_Sweep_Span = Vertical_Sweep_Span; @@ -3115,7 +3121,7 @@ /* Horizontal Sweep */ if ( !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS ) ) { - FT_TRACE7(( "Horizontal pass (ftraster)\n" )); + FT_TRACE6(( "Horizontal pass (ftraster)\n" )); ras.Proc_Sweep_Init = Horizontal_Sweep_Init; ras.Proc_Sweep_Span = Horizontal_Sweep_Span; From 322e580bd04550dd664081d1a9bf59f602a171d8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 9 Oct 2023 22:22:24 -0400 Subject: [PATCH 035/191] * src/smooth/ftgrays.c: Move the sweep functions... ... out of the setjmp/longjmp scope for readability. --- src/smooth/ftgrays.c | 268 +++++++++++++++++++++---------------------- 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index fbf1541ef..4574da8bc 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1486,139 +1486,6 @@ typedef ptrdiff_t FT_PtrDist; } - static void - gray_sweep( RAS_ARG ) - { - int fill = ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL ) ? 0x100 - : INT_MIN; - int coverage; - int y; - - - for ( y = ras.min_ey; y < ras.max_ey; y++ ) - { - PCell cell = ras.ycells[y - ras.min_ey]; - TCoord x = ras.min_ex; - TArea cover = 0; - - unsigned char* line = ras.target.origin - ras.target.pitch * y; - - - for ( ; cell != ras.cell_null; cell = cell->next ) - { - TArea area; - - - if ( cover != 0 && cell->x > x ) - { - FT_FILL_RULE( coverage, cover, fill ); - FT_GRAY_SET( line + x, coverage, cell->x - x ); - } - - cover += (TArea)cell->cover * ( ONE_PIXEL * 2 ); - area = cover - cell->area; - - if ( area != 0 && cell->x >= ras.min_ex ) - { - FT_FILL_RULE( coverage, area, fill ); - line[cell->x] = (unsigned char)coverage; - } - - x = cell->x + 1; - } - - if ( cover != 0 ) /* only if cropped */ - { - FT_FILL_RULE( coverage, cover, fill ); - FT_GRAY_SET( line + x, coverage, ras.max_ex - x ); - } - } - } - - - static void - gray_sweep_direct( RAS_ARG ) - { - int fill = ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL ) ? 0x100 - : INT_MIN; - int coverage; - int y; - - FT_Span span[FT_MAX_GRAY_SPANS]; - int n = 0; - - - for ( y = ras.min_ey; y < ras.max_ey; y++ ) - { - PCell cell = ras.ycells[y - ras.min_ey]; - TCoord x = ras.min_ex; - TArea cover = 0; - - - for ( ; cell != ras.cell_null; cell = cell->next ) - { - TArea area; - - - if ( cover != 0 && cell->x > x ) - { - FT_FILL_RULE( coverage, cover, fill ); - - span[n].coverage = (unsigned char)coverage; - span[n].x = (short)x; - span[n].len = (unsigned short)( cell->x - x ); - - if ( ++n == FT_MAX_GRAY_SPANS ) - { - /* flush the span buffer and reset the count */ - ras.render_span( y, n, span, ras.render_span_data ); - n = 0; - } - } - - cover += (TArea)cell->cover * ( ONE_PIXEL * 2 ); - area = cover - cell->area; - - if ( area != 0 && cell->x >= ras.min_ex ) - { - FT_FILL_RULE( coverage, area, fill ); - - span[n].coverage = (unsigned char)coverage; - span[n].x = (short)cell->x; - span[n].len = 1; - - if ( ++n == FT_MAX_GRAY_SPANS ) - { - /* flush the span buffer and reset the count */ - ras.render_span( y, n, span, ras.render_span_data ); - n = 0; - } - } - - x = cell->x + 1; - } - - if ( cover != 0 ) /* only if cropped */ - { - FT_FILL_RULE( coverage, cover, fill ); - - span[n].coverage = (unsigned char)coverage; - span[n].x = (short)x; - span[n].len = (unsigned short)( ras.max_ex - x ); - - ++n; - } - - if ( n ) - { - /* flush the span buffer and reset the count */ - ras.render_span( y, n, span, ras.render_span_data ); - n = 0; - } - } - } - - #ifdef STANDALONE_ /************************************************************************** @@ -1934,7 +1801,7 @@ typedef ptrdiff_t FT_PtrDist; if ( continued ) FT_Trace_Enable(); - FT_TRACE7(( "band [%d..%d]: %td cell%s remaining/\n", + FT_TRACE7(( "band [%d..%d]: %td cell%s remaining\n", ras.min_ey, ras.max_ey, ras.cell_null - ras.cell_free, @@ -1952,6 +1819,139 @@ typedef ptrdiff_t FT_PtrDist; } + static void + gray_sweep( RAS_ARG ) + { + int fill = ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL ) ? 0x100 + : INT_MIN; + int coverage; + int y; + + + for ( y = ras.min_ey; y < ras.max_ey; y++ ) + { + PCell cell = ras.ycells[y - ras.min_ey]; + TCoord x = ras.min_ex; + TArea cover = 0; + + unsigned char* line = ras.target.origin - ras.target.pitch * y; + + + for ( ; cell != ras.cell_null; cell = cell->next ) + { + TArea area; + + + if ( cover != 0 && cell->x > x ) + { + FT_FILL_RULE( coverage, cover, fill ); + FT_GRAY_SET( line + x, coverage, cell->x - x ); + } + + cover += (TArea)cell->cover * ( ONE_PIXEL * 2 ); + area = cover - cell->area; + + if ( area != 0 && cell->x >= ras.min_ex ) + { + FT_FILL_RULE( coverage, area, fill ); + line[cell->x] = (unsigned char)coverage; + } + + x = cell->x + 1; + } + + if ( cover != 0 ) /* only if cropped */ + { + FT_FILL_RULE( coverage, cover, fill ); + FT_GRAY_SET( line + x, coverage, ras.max_ex - x ); + } + } + } + + + static void + gray_sweep_direct( RAS_ARG ) + { + int fill = ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL ) ? 0x100 + : INT_MIN; + int coverage; + int y; + + FT_Span span[FT_MAX_GRAY_SPANS]; + int n = 0; + + + for ( y = ras.min_ey; y < ras.max_ey; y++ ) + { + PCell cell = ras.ycells[y - ras.min_ey]; + TCoord x = ras.min_ex; + TArea cover = 0; + + + for ( ; cell != ras.cell_null; cell = cell->next ) + { + TArea area; + + + if ( cover != 0 && cell->x > x ) + { + FT_FILL_RULE( coverage, cover, fill ); + + span[n].coverage = (unsigned char)coverage; + span[n].x = (short)x; + span[n].len = (unsigned short)( cell->x - x ); + + if ( ++n == FT_MAX_GRAY_SPANS ) + { + /* flush the span buffer and reset the count */ + ras.render_span( y, n, span, ras.render_span_data ); + n = 0; + } + } + + cover += (TArea)cell->cover * ( ONE_PIXEL * 2 ); + area = cover - cell->area; + + if ( area != 0 && cell->x >= ras.min_ex ) + { + FT_FILL_RULE( coverage, area, fill ); + + span[n].coverage = (unsigned char)coverage; + span[n].x = (short)cell->x; + span[n].len = 1; + + if ( ++n == FT_MAX_GRAY_SPANS ) + { + /* flush the span buffer and reset the count */ + ras.render_span( y, n, span, ras.render_span_data ); + n = 0; + } + } + + x = cell->x + 1; + } + + if ( cover != 0 ) /* only if cropped */ + { + FT_FILL_RULE( coverage, cover, fill ); + + span[n].coverage = (unsigned char)coverage; + span[n].x = (short)x; + span[n].len = (unsigned short)( ras.max_ex - x ); + + ++n; + } + + if ( n ) + { + /* flush the span buffer and reset the count */ + ras.render_span( y, n, span, ras.render_span_data ); + n = 0; + } + } + } + + static int gray_convert_glyph( RAS_ARG ) { From 14bcb2867ad8d365419b04595951bc4139d19c00 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 12 Oct 2023 22:44:46 -0400 Subject: [PATCH 036/191] [raster] Miscellaneous clean-ups. * src/raster/ftraster.c (New_Profile): Use NULL. (End_Profile): Optimize variables. (Convert_Glyph): Do not initialize `cProfile` yet. (Render_Single_Pass): Tracing. --- src/raster/ftraster.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 0b89396be..93a86935c 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -634,8 +634,8 @@ ras.cProfile->start = 0; ras.cProfile->height = 0; ras.cProfile->offset = ras.top; - ras.cProfile->link = (PProfile)0; - ras.cProfile->next = (PProfile)0; + ras.cProfile->link = NULL; + ras.cProfile->next = NULL; ras.cProfile->flags = ras.dropOutControl; switch ( aState ) @@ -704,9 +704,6 @@ if ( h > 0 ) { - PProfile oldProfile; - - FT_TRACE7(( " ending profile %p, start = %ld, height = %ld\n", (void *)ras.cProfile, ras.cProfile->start, h )); @@ -719,15 +716,14 @@ ras.cProfile->flags |= Overshoot_Bottom; } - oldProfile = ras.cProfile; - ras.cProfile = (PProfile)ras.top; + ras.cProfile->next = (PProfile)ras.top; + ras.cProfile = (PProfile)ras.top; ras.top += AlignProfileSize; - ras.cProfile->height = 0; ras.cProfile->offset = ras.top; + ras.cProfile->height = 0; - oldProfile->next = ras.cProfile; ras.num_Profs++; } @@ -1979,11 +1975,8 @@ ras.maxBuff = ras.sizeBuff - AlignProfileSize; - ras.numTurns = 0; - - ras.cProfile = (PProfile)ras.top; - ras.cProfile->offset = ras.top; - ras.num_Profs = 0; + ras.numTurns = 0; + ras.num_Profs = 0; last = -1; for ( i = 0; i < ras.outline.n_contours; i++ ) @@ -3048,8 +3041,9 @@ } else { - FT_TRACE6(( "band [%d..%d]: %td bytes remaining\n", - y_min, y_max, (char*)ras.maxBuff - (char*)ras.top )); + FT_TRACE6(( "band [%d..%d]: %hd profiles; %td bytes remaining\n", + y_min, y_max, ras.num_Profs, + (char*)ras.maxBuff - (char*)ras.top )); if ( ras.fProfile ) if ( Draw_Sweep( RAS_VAR ) ) From c7fa00bf4e52be81c41226b1b511825736d02bef Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 13 Oct 2023 00:16:02 -0400 Subject: [PATCH 037/191] [raster] Fix pool overflow checking. * src/raster/ftraster.c (New_Profile, End_Profile): Check for overflow immediately. (Convert_Glyph, Render_Single_Pass): Fix boundaries. --- src/raster/ftraster.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 93a86935c..4f70a737a 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -620,15 +620,16 @@ { if ( !ras.fProfile ) { + ras.fProfile = (PProfile)ras.top; ras.cProfile = (PProfile)ras.top; - ras.fProfile = ras.cProfile; ras.top += AlignProfileSize; - } - if ( ras.top >= ras.maxBuff ) - { - ras.error = FT_THROW( Raster_Overflow ); - return FAILURE; + if ( ras.top >= ras.maxBuff ) + { + FT_TRACE1(( "overflow in New_Profile\n" )); + ras.error = FT_THROW( Raster_Overflow ); + return FAILURE; + } } ras.cProfile->start = 0; @@ -721,19 +722,19 @@ ras.top += AlignProfileSize; + if ( ras.top >= ras.maxBuff ) + { + FT_TRACE1(( "overflow in End_Profile\n" )); + ras.error = FT_THROW( Raster_Overflow ); + return FAILURE; + } + ras.cProfile->offset = ras.top; ras.cProfile->height = 0; ras.num_Profs++; } - if ( ras.top >= ras.maxBuff ) - { - FT_TRACE1(( "overflow in End_Profile\n" )); - ras.error = FT_THROW( Raster_Overflow ); - return FAILURE; - } - ras.joint = FALSE; return SUCCESS; @@ -1973,7 +1974,8 @@ ras.joint = FALSE; ras.fresh = FALSE; - ras.maxBuff = ras.sizeBuff - AlignProfileSize; + ras.top = ras.buff; + ras.maxBuff = ras.sizeBuff; ras.numTurns = 0; ras.num_Profs = 0; @@ -3017,8 +3019,6 @@ ras.minY = (Long)y_min * ras.precision; ras.maxY = (Long)y_max * ras.precision; - ras.top = ras.buff; - ras.error = Raster_Err_Ok; if ( Convert_Glyph( RAS_VARS flipped ) ) From f09c5e58c24b06b71e964d13c39beb86bc19231f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 13 Oct 2023 13:44:39 +0000 Subject: [PATCH 038/191] * src/raster/ftraster.c (Convert_Glyph): Fix null-dereference. --- src/raster/ftraster.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 4f70a737a..570d54711 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1996,16 +1996,18 @@ if ( Decompose_Curve( RAS_VARS first, last, flipped ) ) return FAILURE; + /* Note that ras.gProfile can stay nil if the contour was */ + /* too small to be drawn or degenerate. */ + if ( !ras.gProfile ) + continue; + /* we must now check whether the extreme arcs join or not */ if ( FRAC( ras.lastY ) == 0 && ras.lastY >= ras.minY && ras.lastY <= ras.maxY ) - if ( ras.gProfile && - ( ras.gProfile->flags & Flow_Up ) == + if ( ( ras.gProfile->flags & Flow_Up ) == ( ras.cProfile->flags & Flow_Up ) ) ras.top--; - /* Note that ras.gProfile can be nil if the contour was too small */ - /* to be drawn. */ lastProfile = ras.cProfile; if ( ras.top != ras.cProfile->offset && @@ -2017,8 +2019,7 @@ return FAILURE; /* close the `next profile in contour' linked list */ - if ( ras.gProfile ) - lastProfile->next = ras.gProfile; + lastProfile->next = ras.gProfile; } if ( Finalize_Profile_Table( RAS_VAR ) ) From 153c038e3c60a29f2977407335c148fa75031ce9 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 13 Oct 2023 15:22:32 +0000 Subject: [PATCH 039/191] [raster] Improve profile accounting. * src/raster/ftraster.c (End_Profile): Do not initiate next profile. (New_Profile): Fully initiate new profile. (Convert_Glyph): Clean up variables, initialize `fProfile` here. --- src/raster/ftraster.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 570d54711..d39d52a7b 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -618,9 +618,8 @@ New_Profile( RAS_ARGS TStates aState, Bool overshoot ) { - if ( !ras.fProfile ) + if ( !ras.cProfile || ras.cProfile->height ) { - ras.fProfile = (PProfile)ras.top; ras.cProfile = (PProfile)ras.top; ras.top += AlignProfileSize; @@ -717,20 +716,8 @@ ras.cProfile->flags |= Overshoot_Bottom; } + /* premature, the last profile in the controur must loop */ ras.cProfile->next = (PProfile)ras.top; - ras.cProfile = (PProfile)ras.top; - - ras.top += AlignProfileSize; - - if ( ras.top >= ras.maxBuff ) - { - FT_TRACE1(( "overflow in End_Profile\n" )); - ras.error = FT_THROW( Raster_Overflow ); - return FAILURE; - } - - ras.cProfile->offset = ras.top; - ras.cProfile->height = 0; ras.num_Profs++; } @@ -1971,6 +1958,7 @@ ras.fProfile = NULL; + ras.cProfile = NULL; ras.joint = FALSE; ras.fresh = FALSE; @@ -1983,7 +1971,6 @@ last = -1; for ( i = 0; i < ras.outline.n_contours; i++ ) { - PProfile lastProfile; Bool o; @@ -2009,7 +1996,6 @@ ( ras.cProfile->flags & Flow_Up ) ) ras.top--; - lastProfile = ras.cProfile; if ( ras.top != ras.cProfile->offset && ( ras.cProfile->flags & Flow_Up ) ) o = IS_TOP_OVERSHOOT( ras.lastY ); @@ -2018,8 +2004,11 @@ if ( End_Profile( RAS_VARS o ) ) return FAILURE; - /* close the `next profile in contour' linked list */ - lastProfile->next = ras.gProfile; + /* loop the last profile in the contour */ + ras.cProfile->next = ras.gProfile; + + if ( !ras.fProfile ) + ras.fProfile = ras.gProfile; } if ( Finalize_Profile_Table( RAS_VAR ) ) From 749b8f9d344105357b82766f8c555586a4b84e7c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 14 Oct 2023 22:28:06 -0400 Subject: [PATCH 040/191] * src/raster/ftraster.c: Improve tracing. --- src/raster/ftraster.c | 44 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index d39d52a7b..55a24d73e 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -441,8 +441,7 @@ (Bool)( x - FLOOR( x ) >= ras.precision_half ) /* Smart dropout rounding to find which pixel is closer to span ends. */ - /* To mimick Windows, symmetric cases break down indepenently of the */ - /* precision. */ + /* To mimic Windows, symmetric cases do not depend on the precision. */ #define SMART( p, q ) FLOOR( ( (p) + (q) + ras.precision * 63 / 64 ) >> 1 ) #if FT_RENDER_POOL_SIZE > 2048 @@ -586,8 +585,6 @@ ras.precision_jitter = 2; } - FT_TRACE6(( "Set_High_Precision(%s)\n", High ? "true" : "false" )); - ras.precision = 1 << ras.precision_bits; ras.precision_half = ras.precision >> 1; ras.precision_scale = ras.precision >> Pixel_Bits; @@ -716,7 +713,7 @@ ras.cProfile->flags |= Overshoot_Bottom; } - /* premature, the last profile in the controur must loop */ + /* premature, the last profile in the contour must loop */ ras.cProfile->next = (PProfile)ras.top; ras.num_Profs++; @@ -2198,12 +2195,10 @@ FT_UNUSED( right ); - /* in high-precision mode, we need 12 digits after the comma to */ - /* represent multiples of 1/(1<<12) = 1/4096 */ - FT_TRACE7(( " y=%d x=[% .12f;% .12f]", + FT_TRACE7(( " y=%d x=[% .*f;% .*f]", y, - (double)x1 / (double)ras.precision, - (double)x2 / (double)ras.precision )); + ras.precision_bits, (double)x1 / (double)ras.precision, + ras.precision_bits, (double)x2 / (double)ras.precision )); /* Drop-out control */ @@ -2275,10 +2270,10 @@ Short c1, f1; - FT_TRACE7(( " y=%d x=[% .12f;% .12f]", + FT_TRACE7(( " y=%d x=[% .*f;% .*f]", y, - (double)x1 / (double)ras.precision, - (double)x2 / (double)ras.precision )); + ras.precision_bits, (double)x1 / (double)ras.precision, + ras.precision_bits, (double)x2 / (double)ras.precision )); /* Drop-out control */ @@ -2458,10 +2453,10 @@ FT_UNUSED( right ); - FT_TRACE7(( " x=%d y=[% .12f;% .12f]", + FT_TRACE7(( " x=%d y=[% .*f;% .*f]", y, - (double)x1 / (double)ras.precision, - (double)x2 / (double)ras.precision )); + ras.precision_bits, (double)x1 / (double)ras.precision, + ras.precision_bits, (double)x2 / (double)ras.precision )); /* We should not need this procedure but the vertical sweep */ /* mishandles horizontal lines through pixel centers. So we */ @@ -2529,10 +2524,10 @@ Byte f1; - FT_TRACE7(( " x=%d y=[% .12f;% .12f]", + FT_TRACE7(( " x=%d y=[% .*f;% .*f]", y, - (double)x1 / (double)ras.precision, - (double)x2 / (double)ras.precision )); + ras.precision_bits, (double)x1 / (double)ras.precision, + ras.precision_bits, (double)x2 / (double)ras.precision )); /* During the horizontal sweep, we only take care of drop-outs */ @@ -3004,6 +2999,10 @@ Int band_stack[32]; /* enough to bisect 32-bit int bands */ + FT_TRACE6(( "%s pass [%d..%d]\n", + flipped ? "Horizontal" : "Vertical", + y_min, y_max )); + while ( 1 ) { ras.minY = (Long)y_min * ras.precision; @@ -3084,9 +3083,10 @@ ras.dropOutControl += 1; } - /* Vertical Sweep */ - FT_TRACE6(( "Vertical pass (ftraster)\n" )); + FT_TRACE6(( "BW Raster: precision 1/%d, dropout mode %d\n", + ras.precision, ras.dropOutControl )); + /* Vertical Sweep */ ras.Proc_Sweep_Init = Vertical_Sweep_Init; ras.Proc_Sweep_Span = Vertical_Sweep_Span; ras.Proc_Sweep_Drop = Vertical_Sweep_Drop; @@ -3105,8 +3105,6 @@ /* Horizontal Sweep */ if ( !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS ) ) { - FT_TRACE6(( "Horizontal pass (ftraster)\n" )); - ras.Proc_Sweep_Init = Horizontal_Sweep_Init; ras.Proc_Sweep_Span = Horizontal_Sweep_Span; ras.Proc_Sweep_Drop = Horizontal_Sweep_Drop; From 3fa5c84565f2431a13247f055623508137dc5739 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 17 Oct 2023 23:56:23 -0400 Subject: [PATCH 041/191] [raster] Fix linked profiles in contour loops. This fixes a subtle bug when the last profile in a contour was not properly short-circuited if it was still empty at `End_Profile`. We finalize all linking in `Finalize_Profile_List` now and do nothing else there. The turns are added in `End_Profile`. * src/raster/ftraster.c (Insert_Y_Turn): Moved up unchanged. (End_Profile): Take care of turns but set only preliminary linking. (Finalize_Profile_Table): Take care of linking and null-termination. (Convert_Glyph): Adjusted accordingly. --- src/raster/ftraster.c | 214 ++++++++++++++++++++---------------------- 1 file changed, 101 insertions(+), 113 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 55a24d73e..7991bb118 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -591,6 +591,62 @@ } + /************************************************************************** + * + * @Function: + * Insert_Y_Turn + * + * @Description: + * Insert a salient into the sorted list placed on top of the render + * pool. + * + * @Input: + * New y scanline position. + * + * @Return: + * SUCCESS on success. FAILURE in case of overflow. + */ + static Bool + Insert_Y_Turn( RAS_ARGS Int y ) + { + PLong y_turns; + Int n; + + + n = ras.numTurns - 1; + y_turns = ras.sizeBuff - ras.numTurns; + + /* look for first y value that is <= */ + while ( n >= 0 && y < y_turns[n] ) + n--; + + /* if it is <, simply insert it, ignore if == */ + if ( n >= 0 && y > y_turns[n] ) + do + { + Int y2 = (Int)y_turns[n]; + + + y_turns[n] = y; + y = y2; + } while ( --n >= 0 ); + + if ( n < 0 ) + { + ras.maxBuff--; + if ( ras.maxBuff <= ras.top ) + { + ras.error = FT_THROW( Raster_Overflow ); + return FAILURE; + } + ras.numTurns++; + ras.sizeBuff[-ras.numTurns] = y; + } + + return SUCCESS; + } + + /************************************************************************** * * @Function: @@ -687,10 +743,10 @@ static Bool End_Profile( RAS_ARGS Bool overshoot ) { - Long h; - + PProfile p = ras.cProfile; + Long h = (Long)( ras.top - p->offset ); + Int bottom, top; - h = (Long)( ras.top - ras.cProfile->offset ); if ( h < 0 ) { @@ -701,82 +757,45 @@ if ( h > 0 ) { - FT_TRACE7(( " ending profile %p, start = %ld, height = %ld\n", - (void *)ras.cProfile, ras.cProfile->start, h )); + FT_TRACE7(( " ending profile %p, start = %2ld, height = %+3ld\n", + (void *)p, p->start, p->flags & Flow_Up ? h : -h )); - ras.cProfile->height = h; if ( overshoot ) { - if ( ras.cProfile->flags & Flow_Up ) - ras.cProfile->flags |= Overshoot_Top; + if ( p->flags & Flow_Up ) + p->flags |= Overshoot_Top; else - ras.cProfile->flags |= Overshoot_Bottom; + p->flags |= Overshoot_Bottom; } - /* premature, the last profile in the contour must loop */ - ras.cProfile->next = (PProfile)ras.top; - - ras.num_Profs++; - } - - ras.joint = FALSE; - - return SUCCESS; - } - + p->height = h; - /************************************************************************** - * - * @Function: - * Insert_Y_Turn - * - * @Description: - * Insert a salient into the sorted list placed on top of the render - * pool. - * - * @Input: - * New y scanline position. - * - * @Return: - * SUCCESS on success. FAILURE in case of overflow. - */ - static Bool - Insert_Y_Turn( RAS_ARGS Int y ) - { - PLong y_turns; - Int n; - - - n = ras.numTurns - 1; - y_turns = ras.sizeBuff - ras.numTurns; - - /* look for first y value that is <= */ - while ( n >= 0 && y < y_turns[n] ) - n--; - - /* if it is <, simply insert it, ignore if == */ - if ( n >= 0 && y > y_turns[n] ) - do + if ( p->flags & Flow_Up ) { - Int y2 = (Int)y_turns[n]; + bottom = (Int)p->start; + top = (Int)( p->start + h - 1 ); + } + else + { + bottom = (Int)( p->start - h + 1 ); + top = (Int)p->start; + p->start = bottom; + p->offset += h - 1; + } + if ( Insert_Y_Turn( RAS_VARS bottom ) || + Insert_Y_Turn( RAS_VARS top + 1 ) ) + return FAILURE; - y_turns[n] = y; - y = y2; - } while ( --n >= 0 ); + /* preliminary values to be finalized */ + p->link = (PProfile)ras.top; + p->next = ras.gProfile; - if ( n < 0 ) - { - ras.maxBuff--; - if ( ras.maxBuff <= ras.top ) - { - ras.error = FT_THROW( Raster_Overflow ); - return FAILURE; - } - ras.numTurns++; - ras.sizeBuff[-ras.numTurns] = y; + ras.num_Profs++; } + ras.joint = FALSE; + return SUCCESS; } @@ -788,56 +807,28 @@ * * @Description: * Adjust all links in the profiles list. - * - * @Return: - * SUCCESS on success. FAILURE in case of overflow. */ - static Bool + static void Finalize_Profile_Table( RAS_ARG ) { - UShort n; - PProfile p; - + UShort n = ras.num_Profs; + PProfile p = ras.fProfile; + PProfile q; - n = ras.num_Profs; - p = ras.fProfile; - if ( n > 1 && p ) + while ( --n ) { - do - { - Int bottom, top; - - - if ( n > 1 ) - p->link = (PProfile)( p->offset + p->height ); - else - p->link = NULL; - - if ( p->flags & Flow_Up ) - { - bottom = (Int)p->start; - top = (Int)( p->start + p->height - 1 ); - } - else - { - bottom = (Int)( p->start - p->height + 1 ); - top = (Int)p->start; - p->start = bottom; - p->offset += p->height - 1; - } + q = p->link; - if ( Insert_Y_Turn( RAS_VARS bottom ) || - Insert_Y_Turn( RAS_VARS top + 1 ) ) - return FAILURE; + /* fix the contour loop */ + if ( q->next == p->next ) + p->next = q; - p = p->link; - } while ( --n ); + p = q; } - else - ras.fProfile = NULL; - return SUCCESS; + /* null-terminate */ + p->link = NULL; } @@ -2001,17 +1992,14 @@ if ( End_Profile( RAS_VARS o ) ) return FAILURE; - /* loop the last profile in the contour */ - ras.cProfile->next = ras.gProfile; - - if ( !ras.fProfile ) + if ( !ras.fProfile && ras.num_Profs ) ras.fProfile = ras.gProfile; } - if ( Finalize_Profile_Table( RAS_VAR ) ) - return FAILURE; + if ( ras.num_Profs ) + Finalize_Profile_Table( RAS_VAR ); - return (Bool)( ras.top < ras.maxBuff ? SUCCESS : FAILURE ); + return SUCCESS; } From a35da2c09312e222e5728e849988f1acf998df9a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 18 Oct 2023 18:44:00 +0000 Subject: [PATCH 042/191] * src/raster/ftraster.c (Convert_Glyph): Remove redundant check. --- src/raster/ftraster.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 7991bb118..44c65d59d 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -115,12 +115,12 @@ * a change of direction is detected in the outline, a new profile is * generated until the end of the outline. * - * Note that when all profiles have been generated, the function - * Finalize_Profile_Table() is used to record, for each profile, its - * bottom-most scanline as well as the scanline above its upmost - * boundary. These positions are called `y-turns' because they (sort - * of) correspond to local extrema. They are stored in a sorted list - * built from the top of the render pool as a downwards stack: + * Note that, for all generated profiles, the function End_Profile() + * is used to record their bottom-most scanline as well as the + * scanline above its upmost boundary. These positions are called + * `y-turns' because they (sort of) correspond to local extrema. + * They are stored in a sorted list built from the top of the render + * pool as a downwards stack: * * _ _ _______________________________________ * | | @@ -136,7 +136,7 @@ * optimize performance (see technical note on the sweep below). * * Of course, the raster detects whether the two stacks collide and - * handles the situation properly. + * handles the situation by bisecting the job and restarting. * */ @@ -1984,11 +1984,9 @@ ( ras.cProfile->flags & Flow_Up ) ) ras.top--; - if ( ras.top != ras.cProfile->offset && - ( ras.cProfile->flags & Flow_Up ) ) - o = IS_TOP_OVERSHOOT( ras.lastY ); - else - o = IS_BOTTOM_OVERSHOOT( ras.lastY ); + o = ras.cProfile->flags & Flow_Up ? IS_TOP_OVERSHOOT( ras.lastY ) + : IS_BOTTOM_OVERSHOOT( ras.lastY ); + if ( End_Profile( RAS_VARS o ) ) return FAILURE; From 4e61303a3b0e6656c38dd9da9f70d18d7e30585b Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 18 Oct 2023 23:13:13 -0400 Subject: [PATCH 043/191] [raster] Small optimizations. * src/raster/ftraster.c (New_Profile): Set important fields only and delay setting `gProfile` until... (End_Profile): ... it is checked to be valid here. (Convert_Glyph): Updated. --- src/raster/ftraster.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 44c65d59d..e5698e18a 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -682,13 +682,11 @@ ras.error = FT_THROW( Raster_Overflow ); return FAILURE; } + + ras.cProfile->height = 0; + ras.cProfile->offset = ras.top; } - ras.cProfile->start = 0; - ras.cProfile->height = 0; - ras.cProfile->offset = ras.top; - ras.cProfile->link = NULL; - ras.cProfile->next = NULL; ras.cProfile->flags = ras.dropOutControl; switch ( aState ) @@ -713,9 +711,6 @@ return FAILURE; } - if ( !ras.gProfile ) - ras.gProfile = ras.cProfile; - ras.state = aState; ras.fresh = TRUE; ras.joint = FALSE; @@ -730,7 +725,7 @@ * End_Profile * * @Description: - * Finalize the current profile. + * Finalize the current profile and record y-turns. * * @Input: * overshoot :: @@ -787,9 +782,12 @@ Insert_Y_Turn( RAS_VARS top + 1 ) ) return FAILURE; + if ( !ras.gProfile ) + ras.gProfile = p; + /* preliminary values to be finalized */ - p->link = (PProfile)ras.top; p->next = ras.gProfile; + p->link = (PProfile)ras.top; ras.num_Profs++; } @@ -816,6 +814,7 @@ PProfile q; + /* there should be at least two profiles, up and down */ while ( --n ) { q = p->link; @@ -1990,11 +1989,11 @@ if ( End_Profile( RAS_VARS o ) ) return FAILURE; - if ( !ras.fProfile && ras.num_Profs ) + if ( !ras.fProfile ) ras.fProfile = ras.gProfile; } - if ( ras.num_Profs ) + if ( ras.fProfile ) Finalize_Profile_Table( RAS_VAR ); return SUCCESS; From fab53f7b1fd7c49ad71f2ab42581569ed7d4e20f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 21 Oct 2023 19:08:20 -0400 Subject: [PATCH 044/191] * src/pcf/pcfutil.c (BSWAP16): Limit clang support. These ancient builtins have been supported by clang since 2013. We condition it somewhat stricter but still around 2017. This is more portable than `__has_builtin`. Fixes #1260. --- src/pcf/pcfutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcf/pcfutil.c b/src/pcf/pcfutil.c index 957572691..cd26c77ca 100644 --- a/src/pcf/pcfutil.c +++ b/src/pcf/pcfutil.c @@ -57,7 +57,7 @@ in this Software without prior written authorization from The Open Group. } -#if defined( __clang__ ) || \ +#if ( defined( __clang_major__ ) && __clang_major__ >= 5 ) || \ ( defined( __GNUC__ ) && \ ( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 8 ) ) ) From 09ae6eb6778d2d12e46dcccc1e7fe4618a249181 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 22 Oct 2023 08:13:35 -0400 Subject: [PATCH 045/191] * src/raster/ftraster.c (Insert_Y_Turn): Improve flow. --- src/raster/ftraster.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index e5698e18a..1db45db38 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -609,19 +609,24 @@ static Bool Insert_Y_Turn( RAS_ARGS Int y ) { - PLong y_turns; - Int n; + Int n = ras.numTurns; + PLong y_turns = ras.maxBuff; - n = ras.numTurns - 1; - y_turns = ras.sizeBuff - ras.numTurns; - /* look for first y value that is <= */ - while ( n >= 0 && y < y_turns[n] ) - n--; + while ( n-- && y < y_turns[n] ) + ; /* if it is <, simply insert it, ignore if == */ - if ( n >= 0 && y > y_turns[n] ) + if ( n < 0 || y > y_turns[n] ) + { + ras.maxBuff--; + if ( ras.maxBuff <= ras.top ) + { + ras.error = FT_THROW( Raster_Overflow ); + return FAILURE; + } + do { Int y2 = (Int)y_turns[n]; @@ -629,18 +634,9 @@ y_turns[n] = y; y = y2; - } while ( --n >= 0 ); + } while ( n-- >= 0 ); - if ( n < 0 ) - { - ras.maxBuff--; - if ( ras.maxBuff <= ras.top ) - { - ras.error = FT_THROW( Raster_Overflow ); - return FAILURE; - } ras.numTurns++; - ras.sizeBuff[-ras.numTurns] = y; } return SUCCESS; From d1e894b1f18abb86779b059257c338006621f864 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 22 Oct 2023 13:08:36 -0400 Subject: [PATCH 046/191] [raster] Clean up sweeping. * src/raster/ftraster.c (Draw_Sweep): Zero initialize the working lists directly and remove unnecessary y-turn checks. (Init_Linked): Removed. --- src/raster/ftraster.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 1db45db38..0c6acd20e 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2005,19 +2005,6 @@ /*************************************************************************/ - /************************************************************************** - * - * Init_Linked - * - * Initializes an empty linked list. - */ - static void - Init_Linked( TProfileList* l ) - { - *l = NULL; - } - - /************************************************************************** * * InsNew @@ -2625,6 +2612,9 @@ * * Generic Sweep Drawing routine * + * Note that this routine is executed with the pool containing at least + * two valid profiles (up and down) and two y-turns (top and bottom). + * */ static Bool @@ -2638,16 +2628,10 @@ Long x1, x2, xs, e1, e2; - TProfileList waiting; - TProfileList draw_left, draw_right; - - - /* initialize empty linked lists */ + TProfileList waiting = NULL; + TProfileList draw_left = NULL; + TProfileList draw_right = NULL; - Init_Linked( &waiting ); - - Init_Linked( &draw_left ); - Init_Linked( &draw_right ); /* first, compute min and max Y */ @@ -2673,13 +2657,6 @@ P = Q; } - /* check the Y-turns */ - if ( ras.numTurns == 0 ) - { - ras.error = FT_THROW( Invalid_Outline ); - return FAILURE; - } - /* now initialize the sweep */ ras.Proc_Sweep_Init( RAS_VARS min_Y, max_Y ); @@ -2699,8 +2676,7 @@ y = min_Y; y_height = 0; - if ( ras.numTurns > 0 && - ras.sizeBuff[-ras.numTurns] == min_Y ) + if ( ras.sizeBuff[-ras.numTurns] == min_Y ) ras.numTurns--; while ( ras.numTurns > 0 ) From a0e10a87f5d4f5e2cb9774f3f20ef3c8bd6b81b3 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 23 Oct 2023 17:47:10 -0400 Subject: [PATCH 047/191] [raster] Slightly improve the pool design. * src/raster/ftraster.c (TProfile): Include the variable array member and repackage with pointers first. (New_Profile): Advance the top using the variable array pointer. --- src/raster/ftraster.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 0c6acd20e..33689afd2 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -305,16 +305,6 @@ typedef unsigned char Byte, *PByte; typedef char Bool; - - typedef union Alignment_ - { - Long l; - void* p; - void (*f)(void); - - } Alignment, *PAlignment; - - typedef struct TPoint_ { Long x; @@ -345,31 +335,28 @@ struct TProfile_ { - FT_F26Dot6 X; /* current coordinate during sweep */ PProfile link; /* link to next profile (various purposes) */ + PProfile next; /* next profile in same contour, used */ + /* during drop-out control */ PLong offset; /* start of profile's data in render pool */ + Long height; /* profile's height in scanlines */ + Long start; /* profile's starting scanline */ UShort flags; /* Bit 0-2: drop-out mode */ /* Bit 3: profile orientation (up/down) */ /* Bit 4: is top profile? */ /* Bit 5: is bottom profile? */ - Long height; /* profile's height in scanlines */ - Long start; /* profile's starting scanline */ Int countL; /* number of lines to step before this */ /* profile becomes drawable */ - - PProfile next; /* next profile in same contour, used */ - /* during drop-out control */ + FT_F26Dot6 X; /* current coordinate during sweep */ + Long x[1]; /* actually variable array of scanline */ + /* intersections with `height` elements */ }; typedef PProfile TProfileList; typedef PProfile* PProfileList; -#define AlignProfileSize \ - ( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( Long ) ) - - #undef RAS_ARG #undef RAS_ARGS #undef RAS_VAR @@ -670,7 +657,7 @@ if ( !ras.cProfile || ras.cProfile->height ) { ras.cProfile = (PProfile)ras.top; - ras.top += AlignProfileSize; + ras.top = ras.cProfile->x; if ( ras.top >= ras.maxBuff ) { From 8c5ec8dd63ffd3f76ba0531dda15d2993ab0f20b Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 23 Oct 2023 22:48:34 -0400 Subject: [PATCH 048/191] [raster] Increase the raster pool density. This only helps to delay the pool overflow and bisections to larger sizes and benefits only very intricate glyphs at reasonable sizes. * src/raster/ftraster.c (TProfile): Use Int instead of Long or PLong when it is sufficient. (New_Profile, End_Profuile, Bezier_Up, Sort): Updated accordingly. --- src/raster/ftraster.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 33689afd2..a06e16d35 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -338,9 +338,9 @@ PProfile link; /* link to next profile (various purposes) */ PProfile next; /* next profile in same contour, used */ /* during drop-out control */ - PLong offset; /* start of profile's data in render pool */ - Long height; /* profile's height in scanlines */ - Long start; /* profile's starting scanline */ + Int offset; /* bottom or currently scanned array index */ + Int height; /* profile's height in scanlines */ + Int start; /* profile's starting scanline */ UShort flags; /* Bit 0-2: drop-out mode */ /* Bit 3: profile orientation (up/down) */ /* Bit 4: is top profile? */ @@ -667,7 +667,6 @@ } ras.cProfile->height = 0; - ras.cProfile->offset = ras.top; } ras.cProfile->flags = ras.dropOutControl; @@ -722,7 +721,7 @@ End_Profile( RAS_ARGS Bool overshoot ) { PProfile p = ras.cProfile; - Long h = (Long)( ras.top - p->offset ); + Int h = (Int)( ras.top - p->x ); Int bottom, top; @@ -735,7 +734,7 @@ if ( h > 0 ) { - FT_TRACE7(( " ending profile %p, start = %2ld, height = %+3ld\n", + FT_TRACE7(( " ending profile %p, start = %2d, height = %+3d\n", (void *)p, p->start, p->flags & Flow_Up ? h : -h )); if ( overshoot ) @@ -750,19 +749,20 @@ if ( p->flags & Flow_Up ) { - bottom = (Int)p->start; - top = (Int)( p->start + h - 1 ); + bottom = p->start; + top = bottom + h; + p->offset = 0; } else { - bottom = (Int)( p->start - h + 1 ); - top = (Int)p->start; - p->start = bottom; - p->offset += h - 1; + top = p->start + 1; + bottom = top - h; + p->start = bottom; + p->offset = h - 1; } - if ( Insert_Y_Turn( RAS_VARS bottom ) || - Insert_Y_Turn( RAS_VARS top + 1 ) ) + if ( Insert_Y_Turn( RAS_VARS bottom ) || + Insert_Y_Turn( RAS_VARS top ) ) return FAILURE; if ( !ras.gProfile ) @@ -1181,7 +1181,7 @@ if ( ras.fresh ) { - ras.cProfile->start = TRUNC( e0 ); + ras.cProfile->start = (Int)TRUNC( e0 ); ras.fresh = FALSE; } @@ -2074,7 +2074,7 @@ current = *list; while ( current ) { - current->X = *current->offset; + current->X = current->x[current->offset]; current->offset += ( current->flags & Flow_Up ) ? 1 : -1; current->height--; current = current->link; From 55d0287cfc31115760cb13caa346b407ef0c0ceb Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 25 Oct 2023 23:23:30 -0400 Subject: [PATCH 049/191] [raster] Switch to routine Int instead of Short. This is mostly cosmetic and removes a few casts, plus Short is promoted to Int in calculations anyway. * src/raster/ftraster.c (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Init, Horizontal_Sweep_Span, Horizontal_Sweep_Drop, Draw_Sweep): Mostly s/Short/Int/ and remove casting. --- src/raster/ftraster.c | 84 +++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index a06e16d35..36d926073 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -394,11 +394,11 @@ /* prototypes used for sweep function dispatch */ typedef void - Function_Sweep_Init( RAS_ARGS Short min, - Short max ); + Function_Sweep_Init( RAS_ARGS Int min, + Int max ); typedef void - Function_Sweep_Span( RAS_ARGS Short y, + Function_Sweep_Span( RAS_ARGS Int y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, @@ -941,7 +941,7 @@ Long maxy ) { Long Dx, Dy; - Int e1, e2, f1, f2, size; /* XXX: is `Short' sufficient? */ + Int e1, e2, f1, f2, size; Long Ix, Rx, Ax; PLong top; @@ -1136,7 +1136,6 @@ Long maxy ) { Long y1, y2, e, e2, e0; - Short f1; TPoint* start_arc; @@ -1162,10 +1161,9 @@ else { e = CEILING( y1 ); - f1 = (Short)( FRAC( y1 ) ); e0 = e; - if ( f1 == 0 ) + if ( FRAC( y1 ) == 0 ) { if ( ras.joint ) { @@ -2124,8 +2122,8 @@ */ static void - Vertical_Sweep_Init( RAS_ARGS Short min, - Short max ) + Vertical_Sweep_Init( RAS_ARGS Int min, + Int max ) { FT_UNUSED( max ); @@ -2135,7 +2133,7 @@ static void - Vertical_Sweep_Span( RAS_ARGS Short y, + Vertical_Sweep_Span( RAS_ARGS Int y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, @@ -2174,8 +2172,7 @@ { Byte* target; - Int c1, c2; - Byte f1, f2; + Int c1, f1, c2, f2; if ( e1 < 0 ) @@ -2185,11 +2182,11 @@ FT_TRACE7(( " -> x=[%ld;%ld]", e1, e2 )); - c1 = (Short)( e1 >> 3 ); - c2 = (Short)( e2 >> 3 ); + c1 = (Int)( e1 >> 3 ); + c2 = (Int)( e2 >> 3 ); - f1 = (Byte) ( 0xFF >> ( e1 & 7 ) ); - f2 = (Byte) ~( 0x7F >> ( e2 & 7 ) ); + f1 = 0xFF >> ( e1 & 7 ); + f2 = ~0x7F >> ( e2 & 7 ); target = ras.bLine + c1; c2 -= c1; @@ -2215,14 +2212,14 @@ static void - Vertical_Sweep_Drop( RAS_ARGS Short y, + Vertical_Sweep_Drop( RAS_ARGS Int y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, PProfile right ) { - Long e1, e2, pxl; - Short c1, f1; + Long e1, e2, pxl; + Int c1, f1; FT_TRACE7(( " y=%d x=[% .*f;% .*f]", @@ -2340,8 +2337,8 @@ e1 = TRUNC( e1 ); - c1 = (Short)( e1 >> 3 ); - f1 = (Short)( e1 & 7 ); + c1 = (Int)( e1 >> 3 ); + f1 = (Int)( e1 & 7 ); if ( e1 >= 0 && e1 < ras.bWidth && ras.bLine[c1] & ( 0x80 >> f1 ) ) @@ -2357,10 +2354,10 @@ { FT_TRACE7(( " -> x=%ld", e1 )); - c1 = (Short)( e1 >> 3 ); - f1 = (Short)( e1 & 7 ); + c1 = (Int)( e1 >> 3 ); + f1 = (Int)( e1 & 7 ); - ras.bLine[c1] |= (char)( 0x80 >> f1 ); + ras.bLine[c1] |= 0x80 >> f1; } Exit: @@ -2385,8 +2382,8 @@ */ static void - Horizontal_Sweep_Init( RAS_ARGS Short min, - Short max ) + Horizontal_Sweep_Init( RAS_ARGS Int min, + Int max ) { /* nothing, really */ FT_UNUSED_RASTER; @@ -2396,7 +2393,7 @@ static void - Horizontal_Sweep_Span( RAS_ARGS Short y, + Horizontal_Sweep_Span( RAS_ARGS Int y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, @@ -2427,12 +2424,12 @@ if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { - Byte f1; + Int f1; PByte bits; bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.target.pitch; - f1 = (Byte)( 0x80 >> ( y & 7 ) ); + f1 = 0x80 >> ( y & 7 ); FT_TRACE7(( bits[0] & f1 ? " redundant" : " -> y=%ld edge", e1 )); @@ -2449,12 +2446,12 @@ if ( e2 >= 0 && (ULong)e2 < ras.target.rows ) { - Byte f1; + Int f1; PByte bits; bits = ras.bOrigin + ( y >> 3 ) - e2 * ras.target.pitch; - f1 = (Byte)( 0x80 >> ( y & 7 ) ); + f1 = 0x80 >> ( y & 7 ); FT_TRACE7(( bits[0] & f1 ? " redundant" : " -> y=%ld edge", e2 )); @@ -2468,7 +2465,7 @@ static void - Horizontal_Sweep_Drop( RAS_ARGS Short y, + Horizontal_Sweep_Drop( RAS_ARGS Int y, FT_F26Dot6 x1, FT_F26Dot6 x2, PProfile left, @@ -2476,7 +2473,7 @@ { Long e1, e2, pxl; PByte bits; - Byte f1; + Int f1; FT_TRACE7(( " x=%d y=[% .*f;% .*f]", @@ -2559,7 +2556,7 @@ e1 = TRUNC( e1 ); bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.target.pitch; - f1 = (Byte)( 0x80 >> ( y & 7 ) ); + f1 = 0x80 >> ( y & 7 ); if ( e1 >= 0 && (ULong)e1 < ras.target.rows && @@ -2577,7 +2574,7 @@ FT_TRACE7(( " -> y=%ld", e1 )); bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.target.pitch; - f1 = (Byte)( 0x80 >> ( y & 7 ) ); + f1 = 0x80 >> ( y & 7 ); bits[0] |= f1; } @@ -2607,12 +2604,11 @@ static Bool Draw_Sweep( RAS_ARG ) { - Short y, y_change, y_height; + Int min_Y, max_Y, top, bottom, dropouts; + Int y, y_change, y_height; PProfile P, Q, P_Left, P_Right; - Short min_Y, max_Y, top, bottom, dropouts; - Long x1, x2, xs, e1, e2; TProfileList waiting = NULL; @@ -2623,15 +2619,15 @@ /* first, compute min and max Y */ P = ras.fProfile; - max_Y = (Short)TRUNC( ras.minY ); - min_Y = (Short)TRUNC( ras.maxY ); + max_Y = (Int)TRUNC( ras.minY ); + min_Y = (Int)TRUNC( ras.maxY ); while ( P ) { Q = P->link; - bottom = (Short)P->start; - top = (Short)( P->start + P->height - 1 ); + bottom = P->start; + top = P->start + P->height - 1; if ( min_Y > bottom ) min_Y = bottom; @@ -2694,8 +2690,8 @@ Sort( &draw_left ); Sort( &draw_right ); - y_change = (Short)ras.sizeBuff[-ras.numTurns--]; - y_height = (Short)( y_change - y ); + y_change = (Int)ras.sizeBuff[-ras.numTurns--]; + y_height = y_change - y; while ( y < y_change ) { From 4e2d1f040cfb185e283003941c18fbc8409e976b Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 30 Oct 2023 22:46:32 -0400 Subject: [PATCH 050/191] [raster] Simplify sweeping entry and exit. * src/raster/ftraster.c (Draw_Sweep): Use y-turns to set the range, correctly set the initial position, directly loop through y_turns, and remove a 5-gray remnant at exit. --- src/raster/ftraster.c | 54 +++++++++++-------------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 36d926073..e32f97014 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2604,67 +2604,46 @@ static Bool Draw_Sweep( RAS_ARG ) { - Int min_Y, max_Y, top, bottom, dropouts; + Int min_Y, max_Y, dropouts; Int y, y_change, y_height; PProfile P, Q, P_Left, P_Right; Long x1, x2, xs, e1, e2; - TProfileList waiting = NULL; + TProfileList waiting = ras.fProfile; TProfileList draw_left = NULL; TProfileList draw_right = NULL; - /* first, compute min and max Y */ + /* use y_turns to set the drawing range */ - P = ras.fProfile; - max_Y = (Int)TRUNC( ras.minY ); - min_Y = (Int)TRUNC( ras.maxY ); - - while ( P ) - { - Q = P->link; - - bottom = P->start; - top = P->start + P->height - 1; - - if ( min_Y > bottom ) - min_Y = bottom; - if ( max_Y < top ) - max_Y = top; - - P->X = 0; - InsNew( &waiting, P ); - - P = Q; - } + min_Y = (Int)ras.maxBuff[0]; + max_Y = (Int)ras.sizeBuff[-1] - 1; /* now initialize the sweep */ ras.Proc_Sweep_Init( RAS_VARS min_Y, max_Y ); - /* then compute the distance of each profile from min_Y */ + /* set the activation countdowns and the initial positions */ P = waiting; - while ( P ) { P->countL = P->start - min_Y; + P->X = P->x[P->offset]; + P = P->link; } - /* let's go */ + /* let's go, iterating through y_turns */ y = min_Y; y_height = 0; - if ( ras.sizeBuff[-ras.numTurns] == min_Y ) - ras.numTurns--; - - while ( ras.numTurns > 0 ) + while ( ++ras.maxBuff < ras.sizeBuff ) { - /* check waiting list for new activations */ + /* check waiting list for new profile activations */ P = waiting; @@ -2690,7 +2669,7 @@ Sort( &draw_left ); Sort( &draw_right ); - y_change = (Int)ras.sizeBuff[-ras.numTurns--]; + y_change = (Int)*ras.maxBuff; y_height = y_change - y; while ( y < y_change ) @@ -2768,7 +2747,7 @@ } } - /* now finalize the profiles that need it */ + /* remove exhausted profiles */ P = draw_left; while ( P ) @@ -2789,13 +2768,6 @@ } } - /* for gray-scaling, flush the bitmap scanline cache */ - while ( y <= max_Y ) - { - ras.Proc_Sweep_Step( RAS_VAR ); - y++; - } - return SUCCESS; Scan_DropOuts: From dc519d06ea67b3f75b2dffe238369b76158e7c8a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 31 Oct 2023 15:01:32 +0000 Subject: [PATCH 051/191] [raster] Simplify dropout detection. * src/raster/ftrater.c (Draw_Sweep): Use a single dropout condition. --- src/raster/ftraster.c | 44 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index e32f97014..6343e902e 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2609,8 +2609,6 @@ PProfile P, Q, P_Left, P_Right; - Long x1, x2, xs, e1, e2; - TProfileList waiting = ras.fProfile; TProfileList draw_left = NULL; TProfileList draw_right = NULL; @@ -2683,8 +2681,10 @@ while ( P_Left && P_Right ) { - x1 = P_Left ->X; - x2 = P_Right->X; + Long x1 = P_Left ->X; + Long x2 = P_Right->X; + Long xs; + if ( x1 > x2 ) { @@ -2693,36 +2693,24 @@ x2 = xs; } - e1 = FLOOR( x1 ); - e2 = CEILING( x2 ); - - if ( x2 - x1 <= ras.precision && - e1 != x1 && e2 != x2 ) + /* if bottom ceiling exceeds top floor, it is a drop-out */ + if ( CEILING( x1 ) > FLOOR( x2 ) ) { - if ( e1 > e2 || e2 == e1 + ras.precision ) - { - Int dropOutControl = P_Left->flags & 7; - + Int dropOutControl = P_Left->flags & 7; - if ( dropOutControl != 2 ) - { - /* a drop-out was detected */ - P_Left ->X = x1; - P_Right->X = x2; - - /* mark profile for drop-out processing */ - P_Left->countL = 1; - dropouts++; - } + if ( dropOutControl != 2 ) + { + P_Left ->X = x1; + P_Right->X = x2; - goto Skip_To_Next; + /* mark profile for drop-out processing */ + P_Left->countL = 1; + dropouts++; } } - - ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right ); - - Skip_To_Next: + else + ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right ); P_Left = P_Left->link; P_Right = P_Right->link; From f2e76e835645e8771a59404c27ef7546ba4cfb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexei=20Podtelezhnikov=20=28=D0=90=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=B4=D1=82=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=B6=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=29?= Date: Thu, 2 Nov 2023 22:08:04 -0400 Subject: [PATCH 052/191] [raster] Remove the jitter exception. The jitter exception used to be applied when two neighboring pixels were barely inside the outline. One the left one was turned on then, which contradicts the OpenType specifications. Intended to remove glitches, it caused disappearing lines and was softened by adding an exception to the exception (#54589). * src/raster/ftraster.c (Vertical_Sweep_Span): Drop the jitter exception. --- src/raster/ftraster.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 6343e902e..a77b57fd1 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -448,7 +448,6 @@ Int precision_half; Int precision_scale; Int precision_step; - Int precision_jitter; PLong buff; /* The profiles buffer */ PLong sizeBuff; /* Render pool size */ @@ -549,27 +548,17 @@ * * 256 / (1 << 12) = 0.0625 pixels. * - * `precision_jitter' is an epsilon threshold used in - * `Vertical_Sweep_Span' to deal with small imperfections in the Bezier - * decomposition (after all, we are working with approximations only); - * it avoids switching on additional pixels which would cause artifacts - * otherwise. - * - * The value of `precision_jitter' has been determined heuristically. - * */ if ( High ) { ras.precision_bits = 12; ras.precision_step = 256; - ras.precision_jitter = 30; } else { ras.precision_bits = 6; ras.precision_step = 32; - ras.precision_jitter = 2; } ras.precision = 1 << ras.precision_bits; @@ -2139,9 +2128,7 @@ PProfile left, PProfile right ) { - Long e1, e2; - - Int dropOutControl = left->flags & 7; + Int e1, e2; FT_UNUSED( y ); FT_UNUSED( left ); @@ -2153,20 +2140,8 @@ ras.precision_bits, (double)x1 / (double)ras.precision, ras.precision_bits, (double)x2 / (double)ras.precision )); - /* Drop-out control */ - - e1 = CEILING( x1 ); - e2 = FLOOR( x2 ); - - /* take care of the special case where both the left */ - /* and right contour lie exactly on pixel centers */ - if ( dropOutControl != 2 && - x2 - x1 - ras.precision <= ras.precision_jitter && - e1 != x1 && e2 != x2 ) - e2 = e1; - - e1 = TRUNC( e1 ); - e2 = TRUNC( e2 ); + e1 = (Int)TRUNC( CEILING( x1 ) ); + e2 = (Int)TRUNC( FLOOR( x2 ) ); if ( e2 >= 0 && e1 < ras.bWidth ) { @@ -2180,10 +2155,10 @@ if ( e2 >= ras.bWidth ) e2 = ras.bWidth - 1; - FT_TRACE7(( " -> x=[%ld;%ld]", e1, e2 )); + FT_TRACE7(( " -> x=[%d;%d]", e1, e2 )); - c1 = (Int)( e1 >> 3 ); - c2 = (Int)( e2 >> 3 ); + c1 = e1 >> 3; + c2 = e2 >> 3; f1 = 0xFF >> ( e1 & 7 ); f2 = ~0x7F >> ( e2 & 7 ); From 6d6607b8b3a78a305cc92d6016c411344c8c7b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexei=20Podtelezhnikov=20=28=D0=90=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=B4=D1=82=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=B6=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=29?= Date: Thu, 2 Nov 2023 22:09:18 -0400 Subject: [PATCH 053/191] [raster] Modify the split condition. While curving close to a pixel center, vertical and horizontal pass might split the curve differently and cause a rare dropout. This makes the split condition invariant of the sweep direction and more robust. * src/raster/ftraster.c (Bezier_Up): Modify the split condition. --- src/raster/ftraster.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index a77b57fd1..1182ff4b8 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1124,7 +1124,8 @@ Long miny, Long maxy ) { - Long y1, y2, e, e2, e0; + Long y1, y2, e, e2, e0, dy; + Long dx, x2; TPoint* start_arc; @@ -1189,19 +1190,25 @@ ras.joint = FALSE; y2 = arc[0].y; + x2 = arc[0].x; if ( y2 > e ) { - y1 = arc[degree].y; - if ( y2 - y1 >= ras.precision_step ) + dy = y2 - arc[degree].y; + dx = x2 - arc[degree].x; + + + /* split condition should be invariant of direction */ + if ( dy > ras.precision_step || + dx > ras.precision_step || + -dx > ras.precision_step ) { splitter( arc ); arc += degree; } else { - *top++ = arc[degree].x + FMulDiv( arc[0].x - arc[degree].x, - e - y1, y2 - y1 ); + *top++ = x2 - FMulDiv( y2 - e, dx, dy ); arc -= degree; e += ras.precision; } @@ -1211,7 +1218,7 @@ if ( y2 == e ) { ras.joint = TRUE; - *top++ = arc[0].x; + *top++ = x2; e += ras.precision; } From 046c4fc7beacdb5290bdb7a1faedc8a43f325187 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 3 Nov 2023 22:34:37 -0400 Subject: [PATCH 054/191] [raster] Instantly remove profiles from linked lists. * src/raster/ftraster.c (DelOld): Remove loopy function. (Draw_Sweep): Implement instant profile removal. --- src/raster/ftraster.c | 70 ++++++++++++------------------------------- 1 file changed, 19 insertions(+), 51 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 1182ff4b8..5538c0c07 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2017,39 +2017,6 @@ } - /************************************************************************** - * - * DelOld - * - * Removes an old profile from a linked list. - */ - static void - DelOld( PProfileList list, - const PProfile profile ) - { - PProfile *old, current; - - - old = list; - current = *old; - - while ( current ) - { - if ( current == profile ) - { - *old = current->link; - return; - } - - old = ¤t->link; - current = *old; - } - - /* we should never get there, unless the profile was not part of */ - /* the list. */ - } - - /************************************************************************** * * Sort @@ -2589,7 +2556,7 @@ Int min_Y, max_Y, dropouts; Int y, y_change, y_height; - PProfile P, Q, P_Left, P_Right; + PProfile *Q, P, P_Left, P_Right; TProfileList waiting = ras.fProfile; TProfileList draw_left = NULL; @@ -2625,23 +2592,22 @@ { /* check waiting list for new profile activations */ - P = waiting; - - while ( P ) + Q = &waiting; + while ( *Q ) { - Q = P->link; + P = *Q; P->countL -= y_height; if ( P->countL == 0 ) { - DelOld( &waiting, P ); + *Q = P->link; /* remove */ if ( P->flags & Flow_Up ) InsNew( &draw_left, P ); else InsNew( &draw_right, P ); } - - P = Q; + else + Q = &P->link; } /* sort the drawing lists */ @@ -2719,22 +2685,24 @@ /* remove exhausted profiles */ - P = draw_left; - while ( P ) + Q = &draw_left; + while ( *Q ) { - Q = P->link; + P = *Q; if ( P->height == 0 ) - DelOld( &draw_left, P ); - P = Q; + *Q = P->link; + else + Q = &P->link; } - P = draw_right; - while ( P ) + Q = &draw_right; + while ( *Q ) { - Q = P->link; + P = *Q; if ( P->height == 0 ) - DelOld( &draw_right, P ); - P = Q; + *Q = P->link; + else + Q = &P->link; } } From 32081d8123342f14b7a0b9811f211c52753de63a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 3 Nov 2023 23:10:41 -0400 Subject: [PATCH 055/191] [raster] Consolidate profile increment to the next line. * src/raster/ftraster.c (s/Sort/Increment): Rename this function to reflect its true purpose, delete exhausted profiles here... (Draw_Sweep): ... instead of here. --- src/raster/ftraster.c | 69 ++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 47 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 5538c0c07..8f4967cd7 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2019,26 +2019,32 @@ /************************************************************************** * - * Sort + * Increment * - * Sorts a trace list. In 95%, the list is already sorted. We need - * an algorithm which is fast in this case. Bubble sort is enough - * and simple. + * Advances all profile in the list to the next scanline. It also + * sorts the trace list in the unlikely case of profile crossing. + * In 95%, the list is already sorted. We need an algorithm which + * is fast in this case. Bubble sort is enough and simple. */ static void - Sort( PProfileList list ) + Increment( PProfileList list ) { PProfile *old, current, next; - /* First, set the new X coordinate of each profile */ - current = *list; - while ( current ) + /* First, set the new X coordinates and remove exhausted profiles */ + old = list; + while ( *old ) { - current->X = current->x[current->offset]; - current->offset += ( current->flags & Flow_Up ) ? 1 : -1; - current->height--; - current = current->link; + current = *old; + if ( --current->height ) + { + current->offset += ( current->flags & Flow_Up ) ? 1 : -1; + current->X = current->x[current->offset]; + old = ¤t->link; + } + else + *old = current->link; /* remove */ } /* Then sort them */ @@ -2610,15 +2616,10 @@ Q = &P->link; } - /* sort the drawing lists */ - - Sort( &draw_left ); - Sort( &draw_right ); - y_change = (Int)*ras.maxBuff; y_height = y_change - y; - while ( y < y_change ) + do { /* let's trace */ @@ -2674,36 +2675,10 @@ ras.Proc_Sweep_Step( RAS_VAR ); - y++; - - if ( y < y_change ) - { - Sort( &draw_left ); - Sort( &draw_right ); - } - } - - /* remove exhausted profiles */ - - Q = &draw_left; - while ( *Q ) - { - P = *Q; - if ( P->height == 0 ) - *Q = P->link; - else - Q = &P->link; - } - - Q = &draw_right; - while ( *Q ) - { - P = *Q; - if ( P->height == 0 ) - *Q = P->link; - else - Q = &P->link; + Increment( &draw_left ); + Increment( &draw_right ); } + while ( ++y < y_change ); } return SUCCESS; From 9e86fb806d93240bb7235ce42201616b19ec59f8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 3 Nov 2023 23:59:05 -0400 Subject: [PATCH 056/191] [raster] Improve profile accounting during sweeping. * src/raster/ftraster.c (TProfile): Get rid of `countL`. (Draw_Sweep): Use `start` for countdown to activation. (Horizontal_Sweep_Drop, Vertical_Sweep_Drop): Rely on `height` and `offset` to verify profile ends for the stub detection. --- src/raster/ftraster.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 8f4967cd7..c015046c3 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -340,14 +340,13 @@ /* during drop-out control */ Int offset; /* bottom or currently scanned array index */ Int height; /* profile's height in scanlines */ - Int start; /* profile's starting scanline */ + Int start; /* profile's starting scanline, also use */ + /* as activation counter */ UShort flags; /* Bit 0-2: drop-out mode */ /* Bit 3: profile orientation (up/down) */ /* Bit 4: is top profile? */ /* Bit 5: is bottom profile? */ - Int countL; /* number of lines to step before this */ - /* profile becomes drawable */ FT_F26Dot6 X; /* current coordinate during sweep */ Long x[1]; /* actually variable array of scanline */ /* intersections with `height` elements */ @@ -2176,6 +2175,8 @@ Long e1, e2, pxl; Int c1, f1; + FT_UNUSED( y ); + FT_TRACE7(( " y=%d x=[% .*f;% .*f]", y, @@ -2257,14 +2258,14 @@ /* upper stub test */ if ( left->next == right && - left->height <= 0 && + left->height == 1 && !( left->flags & Overshoot_Top && x2 - x1 >= ras.precision_half ) ) goto Exit; /* lower stub test */ if ( right->next == left && - left->start == y && + left->offset == 0 && !( left->flags & Overshoot_Bottom && x2 - x1 >= ras.precision_half ) ) goto Exit; @@ -2475,14 +2476,14 @@ /* rightmost stub test */ if ( left->next == right && - left->height <= 0 && + left->height == 1 && !( left->flags & Overshoot_Top && x2 - x1 >= ras.precision_half ) ) goto Exit; /* leftmost stub test */ if ( right->next == left && - left->start == y && + left->offset == 0 && !( left->flags & Overshoot_Bottom && x2 - x1 >= ras.precision_half ) ) goto Exit; @@ -2583,7 +2584,7 @@ P = waiting; while ( P ) { - P->countL = P->start - min_Y; + P->start -= min_Y; P->X = P->x[P->offset]; P = P->link; @@ -2602,8 +2603,8 @@ while ( *Q ) { P = *Q; - P->countL -= y_height; - if ( P->countL == 0 ) + P->start -= y_height; + if ( P->start == 0 ) { *Q = P->link; /* remove */ @@ -2654,7 +2655,7 @@ P_Right->X = x2; /* mark profile for drop-out processing */ - P_Left->countL = 1; + P_Left->start = -1; dropouts++; } } @@ -2690,9 +2691,9 @@ while ( P_Left && P_Right ) { - if ( P_Left->countL ) + if ( P_Left->start ) { - P_Left->countL = 0; + P_Left->start = 0; #if 0 dropouts--; /* -- this is useful when debugging only */ #endif From 8a2ca26b41347010392b65ff69d1a8ed23b1212c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 5 Nov 2023 22:34:16 -0500 Subject: [PATCH 057/191] [raster] Reshuffle code for readability. * src/raster/ftraster.c (Render_Glyph): Setup the rendering pool here. (ft_black_render): Setup the target bitmap helpers here. --- src/raster/ftraster.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index c015046c3..4af0b4db1 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2891,8 +2891,12 @@ Render_Glyph( RAS_ARG ) { FT_Error error; + Long buffer[FT_MAX_BLACK_POOL]; + ras.buff = buffer; + ras.sizeBuff = (&buffer)[1]; /* Points to right after buffer. */ + Set_High_Precision( RAS_VARS ras.outline.flags & FT_OUTLINE_HIGH_PRECISION ); @@ -2918,12 +2922,6 @@ ras.Proc_Sweep_Drop = Vertical_Sweep_Drop; ras.Proc_Sweep_Step = Vertical_Sweep_Step; - ras.bWidth = (UShort)ras.target.width; - ras.bOrigin = (Byte*)ras.target.buffer; - - if ( ras.target.pitch > 0 ) - ras.bOrigin += (Long)( ras.target.rows - 1 ) * ras.target.pitch; - error = Render_Single_Pass( RAS_VARS 0, 0, (Int)ras.target.rows - 1 ); if ( error ) return error; @@ -3047,8 +3045,6 @@ black_TWorker worker[1]; #endif - Long buffer[FT_MAX_BLACK_POOL]; - if ( !raster ) return FT_THROW( Raster_Uninitialized ); @@ -3085,8 +3081,11 @@ ras.outline = *outline; ras.target = *target_map; - ras.buff = buffer; - ras.sizeBuff = (&buffer)[1]; /* Points to right after buffer. */ + ras.bWidth = (UShort)ras.target.width; + ras.bOrigin = (Byte*)ras.target.buffer; + + if ( ras.target.pitch > 0 ) + ras.bOrigin += (Long)( ras.target.rows - 1 ) * ras.target.pitch; return Render_Glyph( RAS_VAR ); } From e9202737747ac008819d24a39c54584200c7a254 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 5 Nov 2023 23:12:56 -0500 Subject: [PATCH 058/191] * src/raster/ftraster.c (Bezier_Up): Improve flow. --- src/raster/ftraster.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 4af0b4db1..c2d8f5d2f 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1123,7 +1123,7 @@ Long miny, Long maxy ) { - Long y1, y2, e, e2, e0, dy; + Long y1, y2, e, e2, dy; Long dx, x2; TPoint* start_arc; @@ -1138,38 +1138,26 @@ if ( y2 < miny || y1 > maxy ) goto Fin; - e2 = FLOOR( y2 ); + e2 = y2 > maxy ? maxy : FLOOR( y2 ); + e = y1 < miny ? miny : CEILING( y1 ); - if ( e2 > maxy ) - e2 = maxy; - - e0 = miny; - - if ( y1 < miny ) - e = miny; - else + if ( ras.fresh ) { - e = CEILING( y1 ); - e0 = e; + ras.cProfile->start = (Int)TRUNC( e ); + ras.fresh = FALSE; + } - if ( FRAC( y1 ) == 0 ) + if ( y1 == e ) + { + if ( ras.joint ) { - if ( ras.joint ) - { - top--; - ras.joint = FALSE; - } - - *top++ = arc[degree].x; - - e += ras.precision; + top--; + ras.joint = FALSE; } - } - if ( ras.fresh ) - { - ras.cProfile->start = (Int)TRUNC( e0 ); - ras.fresh = FALSE; + *top++ = arc[degree].x; + + e += ras.precision; } if ( e2 < e ) From 6338f2a6814b3f50a0bb3a4c563ef30e4561041a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 6 Nov 2023 18:56:38 -0500 Subject: [PATCH 059/191] [raster] Harmonize target bitmap navigation. * src/raster/ftraster.c (black_TWorker): Store signed maximum indexes in both directions instead of unsigned dimensions of the original bitmap. (*_Sweep_*, Render_Glyph, ft_black_render): Updated all users. --- src/raster/ftraster.c | 63 ++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index c2d8f5d2f..41b13fd19 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -459,10 +459,6 @@ Byte dropOutControl; /* current drop_out control method */ - UShort bWidth; /* target bitmap width */ - PByte bOrigin; /* target bitmap bottom-left origin */ - PByte bLine; /* target bitmap current line */ - Long lastX, lastY; Long minY, maxY; @@ -480,9 +476,14 @@ TStates state; /* rendering state */ - FT_Bitmap target; /* description of target bit/pixmap */ FT_Outline outline; + Int bTop; /* target bitmap max line index */ + Int bRight; /* target bitmap rightmost index */ + Int bPitch; /* target bitmap pitch */ + PByte bOrigin; /* target bitmap bottom-left origin */ + PByte bLine; /* target bitmap current line */ + /* dispatch variables */ Function_Sweep_Init* Proc_Sweep_Init; @@ -2084,7 +2085,7 @@ FT_UNUSED( max ); - ras.bLine = ras.bOrigin - min * ras.target.pitch; + ras.bLine = ras.bOrigin - min * ras.bPitch; } @@ -2110,7 +2111,7 @@ e1 = (Int)TRUNC( CEILING( x1 ) ); e2 = (Int)TRUNC( FLOOR( x2 ) ); - if ( e2 >= 0 && e1 < ras.bWidth ) + if ( e2 >= 0 && e1 <= ras.bRight ) { Byte* target; @@ -2119,8 +2120,8 @@ if ( e1 < 0 ) e1 = 0; - if ( e2 >= ras.bWidth ) - e2 = ras.bWidth - 1; + if ( e2 > ras.bRight ) + e2 = ras.bRight; FT_TRACE7(( " -> x=[%d;%d]", e1, e2 )); @@ -2273,7 +2274,7 @@ /* bounding box instead */ if ( pxl < 0 ) pxl = e1; - else if ( TRUNC( pxl ) >= ras.bWidth ) + else if ( TRUNC( pxl ) > ras.bRight ) pxl = e2; /* check that the other pixel isn't set */ @@ -2284,7 +2285,7 @@ c1 = (Int)( e1 >> 3 ); f1 = (Int)( e1 & 7 ); - if ( e1 >= 0 && e1 < ras.bWidth && + if ( e1 >= 0 && e1 <= ras.bRight && ras.bLine[c1] & ( 0x80 >> f1 ) ) goto Exit; } @@ -2294,7 +2295,7 @@ e1 = TRUNC( pxl ); - if ( e1 >= 0 && e1 < ras.bWidth ) + if ( e1 >= 0 && e1 <= ras.bRight ) { FT_TRACE7(( " -> x=%ld", e1 )); @@ -2312,7 +2313,7 @@ static void Vertical_Sweep_Step( RAS_ARG ) { - ras.bLine -= ras.target.pitch; + ras.bLine -= ras.bPitch; } @@ -2366,13 +2367,13 @@ { e1 = TRUNC( e1 ); - if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) + if ( e1 >= 0 && e1 <= ras.bTop ) { Int f1; PByte bits; - bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.target.pitch; + bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch; f1 = 0x80 >> ( y & 7 ); FT_TRACE7(( bits[0] & f1 ? " redundant" @@ -2388,13 +2389,13 @@ { e2 = TRUNC( e2 ); - if ( e2 >= 0 && (ULong)e2 < ras.target.rows ) + if ( e2 >= 0 && e2 <= ras.bTop ) { Int f1; PByte bits; - bits = ras.bOrigin + ( y >> 3 ) - e2 * ras.target.pitch; + bits = ras.bOrigin + ( y >> 3 ) - e2 * ras.bPitch; f1 = 0x80 >> ( y & 7 ); FT_TRACE7(( bits[0] & f1 ? " redundant" @@ -2491,7 +2492,7 @@ /* bounding box instead */ if ( pxl < 0 ) pxl = e1; - else if ( (ULong)( TRUNC( pxl ) ) >= ras.target.rows ) + else if ( TRUNC( pxl ) > ras.bTop ) pxl = e2; /* check that the other pixel isn't set */ @@ -2499,12 +2500,11 @@ e1 = TRUNC( e1 ); - bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.target.pitch; + bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch; f1 = 0x80 >> ( y & 7 ); - if ( e1 >= 0 && - (ULong)e1 < ras.target.rows && - *bits & f1 ) + if ( e1 >= 0 && e1 <= ras.bTop && + *bits & f1 ) goto Exit; } else @@ -2513,11 +2513,11 @@ e1 = TRUNC( pxl ); - if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) + if ( e1 >= 0 && e1 <= ras.bTop ) { FT_TRACE7(( " -> y=%ld", e1 )); - bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.target.pitch; + bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch; f1 = 0x80 >> ( y & 7 ); bits[0] |= f1; @@ -2910,7 +2910,7 @@ ras.Proc_Sweep_Drop = Vertical_Sweep_Drop; ras.Proc_Sweep_Step = Vertical_Sweep_Step; - error = Render_Single_Pass( RAS_VARS 0, 0, (Int)ras.target.rows - 1 ); + error = Render_Single_Pass( RAS_VARS 0, 0, ras.bTop ); if ( error ) return error; @@ -2922,7 +2922,7 @@ ras.Proc_Sweep_Drop = Horizontal_Sweep_Drop; ras.Proc_Sweep_Step = Horizontal_Sweep_Step; - error = Render_Single_Pass( RAS_VARS 1, 0, (Int)ras.target.width - 1 ); + error = Render_Single_Pass( RAS_VARS 1, 0, ras.bRight ); if ( error ) return error; } @@ -3067,13 +3067,14 @@ return FT_THROW( Invalid_Argument ); ras.outline = *outline; - ras.target = *target_map; - ras.bWidth = (UShort)ras.target.width; - ras.bOrigin = (Byte*)ras.target.buffer; + ras.bTop = (Int)target_map->rows - 1; + ras.bRight = (Int)target_map->width - 1; + ras.bPitch = (Int)target_map->pitch; + ras.bOrigin = (PByte)target_map->buffer; - if ( ras.target.pitch > 0 ) - ras.bOrigin += (Long)( ras.target.rows - 1 ) * ras.target.pitch; + if ( ras.bPitch > 0 ) + ras.bOrigin += ras.bTop * ras.bPitch; return Render_Glyph( RAS_VAR ); } From e9a81e4dd8baa0c572635dca2000fee14db9e4b3 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 9 Nov 2023 22:31:36 -0500 Subject: [PATCH 060/191] * src/raster/ftraster.c (Bezier_Up): Improve joint and loop. --- src/raster/ftraster.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 41b13fd19..ece8c10e7 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1151,22 +1151,19 @@ if ( y1 == e ) { if ( ras.joint ) - { top--; - ras.joint = FALSE; - } *top++ = arc[degree].x; - - e += ras.precision; + e += ras.precision; } + ras.joint = (Bool)( y2 == e2 ); + if ( e2 < e ) goto Fin; if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { - ras.top = top; ras.error = FT_THROW( Raster_Overflow ); return FAILURE; } @@ -1175,8 +1172,6 @@ do { - ras.joint = FALSE; - y2 = arc[0].y; x2 = arc[0].x; @@ -1185,7 +1180,6 @@ dy = y2 - arc[degree].y; dx = x2 - arc[degree].x; - /* split condition should be invariant of direction */ if ( dy > ras.precision_step || dx > ras.precision_step || @@ -1197,22 +1191,21 @@ else { *top++ = x2 - FMulDiv( y2 - e, dx, dy ); + e += ras.precision; arc -= degree; - e += ras.precision; } } else { if ( y2 == e ) { - ras.joint = TRUE; - *top++ = x2; - - e += ras.precision; + *top++ = x2; + e += ras.precision; } - arc -= degree; + arc -= degree; } - } while ( arc >= start_arc && e <= e2 ); + } + while ( e <= e2 ); Fin: ras.top = top; From d5973932d0f5e0336c1de6fad3d8029a8bde1957 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 9 Nov 2023 22:52:14 -0500 Subject: [PATCH 061/191] * src/raster/ftraster.c (End_Profile, Convert_Glyph): Clean up. --- src/raster/ftraster.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index ece8c10e7..6725af0a3 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -764,8 +764,6 @@ ras.num_Profs++; } - ras.joint = FALSE; - return SUCCESS; } @@ -1904,8 +1902,6 @@ ras.fProfile = NULL; ras.cProfile = NULL; - ras.joint = FALSE; - ras.fresh = FALSE; ras.top = ras.buff; ras.maxBuff = ras.sizeBuff; From 028b0d5c1be1b1fe9305e073760ba6ac614ba6d8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 10 Nov 2023 23:25:26 -0500 Subject: [PATCH 062/191] * src/raster/ftraster.c (Line_Up): Updated and fixed up. This largely synchronizes the entries into `Line_Up` and `Bezier_Up`. Minor bugs in the remainder calculations and accumulations are fixed. --- src/raster/ftraster.c | 128 ++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 74 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 6725af0a3..dd3858aea 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -927,107 +927,87 @@ Long miny, Long maxy ) { - Long Dx, Dy; - Int e1, e2, f1, f2, size; - Long Ix, Rx, Ax; + Long e, e2, Dx, Dy; + Long Ix, Rx, Ax; + Int size; - PLong top; + PLong top; - Dx = x2 - x1; - Dy = y2 - y1; + top = ras.top; - if ( Dy <= 0 || y2 < miny || y1 > maxy ) - return SUCCESS; + if ( y2 == y1 || y2 < miny || y1 > maxy ) + goto Fin; - if ( y1 < miny ) - { - /* Take care: miny-y1 can be a very large value; we use */ - /* a slow MulDiv function to avoid clipping bugs */ - x1 += SMulDiv( Dx, miny - y1, Dy ); - e1 = (Int)TRUNC( miny ); - f1 = 0; - } - else - { - e1 = (Int)TRUNC( y1 ); - f1 = (Int)FRAC( y1 ); - } + e2 = y2 > maxy ? maxy : FLOOR( y2 ); + e = y1 < miny ? miny : CEILING( y1 ); - if ( y2 > maxy ) - { - /* x2 += FMulDiv( Dx, maxy - y2, Dy ); UNNECESSARY */ - e2 = (Int)TRUNC( maxy ); - f2 = 0; - } - else + if ( ras.fresh ) { - e2 = (Int)TRUNC( y2 ); - f2 = (Int)FRAC( y2 ); + ras.cProfile->start = (Int)TRUNC( e ); + ras.fresh = FALSE; } - if ( f1 > 0 ) - { - if ( e1 == e2 ) - return SUCCESS; - else - { - x1 += SMulDiv( Dx, ras.precision - f1, Dy ); - e1 += 1; - } - } - else - if ( ras.joint ) - { - ras.top--; - ras.joint = FALSE; - } + if ( y1 == e && ras.joint ) + top--; - ras.joint = (char)( f2 == 0 ); + ras.joint = (Bool)( y2 == e2 ); - if ( ras.fresh ) - { - ras.cProfile->start = e1; - ras.fresh = FALSE; - } + if ( e2 < e ) + goto Fin; - size = e2 - e1 + 1; - if ( ras.top + size >= ras.maxBuff ) + size = (Int)TRUNC( e2 - e ) + 1; + + if ( top + size >= ras.maxBuff ) { ras.error = FT_THROW( Raster_Overflow ); return FAILURE; } - if ( Dx > 0 ) - { - Ix = SMulDiv_No_Round( ras.precision, Dx, Dy ); - Rx = ( ras.precision * Dx ) % Dy; - Dx = 1; - } - else + Dx = x2 - x1; + Dy = y2 - y1; + + if ( Dx == 0 ) /* very easy */ { - Ix = -SMulDiv_No_Round( ras.precision, -Dx, Dy ); - Rx = ( ras.precision * -Dx ) % Dy; - Dx = -1; + do + *top++ = x1; + while ( --size ); + goto Fin; } - Ax = -Dy; - top = ras.top; + Ix = SMulDiv_No_Round( e - y1, Dx, Dy ); + x1 += Ix; + *top++ = x1; - while ( size > 0 ) + if ( --size ) { - *top++ = x1; + Ax = Dx * ( e - y1 ) - Dy * Ix; /* remainder */ + Ix = FMulDiv( ras.precision, Dx, Dy ); + Rx = Dx * ras.precision - Dy * Ix; /* remainder */ + Dx = 1; - x1 += Ix; - Ax += Rx; - if ( Ax >= 0 ) + if ( x2 < x1 ) { - Ax -= Dy; - x1 += Dx; + Ax = -Ax; + Rx = -Rx; + Dx = -Dx; } - size--; + + do + { + x1 += Ix; + Ax += Rx; + if ( Ax >= Dy ) + { + Ax -= Dy; + x1 += Dx; + } + *top++ = x1; + } + while ( --size ); } + Fin: ras.top = top; return SUCCESS; } From 9cd403bc9f670603f5f0ce171fc8d470ec78e7be Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 11 Nov 2023 10:18:53 -0500 Subject: [PATCH 063/191] * src/raster/ftraster.c (Line_Up, Bezier_Up): Check "between" earlier. --- src/raster/ftraster.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index dd3858aea..de1c35f5e 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -942,6 +942,9 @@ e2 = y2 > maxy ? maxy : FLOOR( y2 ); e = y1 < miny ? miny : CEILING( y1 ); + if ( e2 < e ) /* between scanlines */ + goto Fin; + if ( ras.fresh ) { ras.cProfile->start = (Int)TRUNC( e ); @@ -953,9 +956,6 @@ ras.joint = (Bool)( y2 == e2 ); - if ( e2 < e ) - goto Fin; - size = (Int)TRUNC( e2 - e ) + 1; if ( top + size >= ras.maxBuff ) @@ -1105,8 +1105,6 @@ Long y1, y2, e, e2, dy; Long dx, x2; - TPoint* start_arc; - PLong top; @@ -1120,6 +1118,9 @@ e2 = y2 > maxy ? maxy : FLOOR( y2 ); e = y1 < miny ? miny : CEILING( y1 ); + if ( e2 < e ) /* between scanlines */ + goto Fin; + if ( ras.fresh ) { ras.cProfile->start = (Int)TRUNC( e ); @@ -1137,18 +1138,13 @@ ras.joint = (Bool)( y2 == e2 ); - if ( e2 < e ) - goto Fin; - if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { ras.error = FT_THROW( Raster_Overflow ); return FAILURE; } - start_arc = arc; - - do + while ( e <= e2 ) { y2 = arc[0].y; x2 = arc[0].x; @@ -1183,7 +1179,6 @@ arc -= degree; } } - while ( e <= e2 ); Fin: ras.top = top; From d5e8686dd80cf67146b623f2b8c68fc43776d85c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 11 Nov 2023 21:10:29 -0500 Subject: [PATCH 064/191] [raster] Get rid of the joint flag. * src/raster/ftraster.c (Line_Up, Bezier_Up): Deal with the scanline joints directly based on the initial y-coordinate. (New_Profile, black_TWorker): Remove the boolean flag. --- src/raster/ftraster.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index de1c35f5e..372d96f8a 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -466,9 +466,6 @@ Bool fresh; /* signals a fresh new profile which */ /* `start' field must be completed */ - Bool joint; /* signals that the last arc ended */ - /* exactly on a scanline. Allows */ - /* removal of doublets */ PProfile cProfile; /* current profile */ PProfile fProfile; /* head of linked list of profiles */ PProfile gProfile; /* contour's first profile in case */ @@ -684,7 +681,6 @@ ras.state = aState; ras.fresh = TRUE; - ras.joint = FALSE; return SUCCESS; } @@ -950,12 +946,9 @@ ras.cProfile->start = (Int)TRUNC( e ); ras.fresh = FALSE; } - - if ( y1 == e && ras.joint ) + else if ( y1 == e ) top--; - ras.joint = (Bool)( y2 == e2 ); - size = (Int)TRUNC( e2 - e ) + 1; if ( top + size >= ras.maxBuff ) @@ -1126,18 +1119,15 @@ ras.cProfile->start = (Int)TRUNC( e ); ras.fresh = FALSE; } + else if ( y1 == e ) + top--; if ( y1 == e ) { - if ( ras.joint ) - top--; - *top++ = arc[degree].x; e += ras.precision; } - ras.joint = (Bool)( y2 == e2 ); - if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { ras.error = FT_THROW( Raster_Overflow ); From e9359e29bea9f3d4933f7bff7f75d662d0627ef6 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 12 Nov 2023 23:01:49 -0500 Subject: [PATCH 065/191] [raster] Get rid of the fresh flag. * src/raster/ftraster.c (black_TWorker): Remove the fresh flag. (New_Profile): Set the starting scanline here based on the current coordinate and initialize the joint crossing if necessary. (Line_Up, Bezier_Up): Do not deal with fresh and joint starts at all. (Line_Down, Bezier_Down): Simplify. (Conic_To, Cubic_To): Update the current coordinate after each subsection. --- src/raster/ftraster.c | 108 ++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 63 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 372d96f8a..d2f56942f 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -455,17 +455,14 @@ FT_Error error; - Int numTurns; /* number of Y-turns in outline */ - Byte dropOutControl; /* current drop_out control method */ Long lastX, lastY; Long minY, maxY; UShort num_Profs; /* current number of profiles */ + Int numTurns; /* number of Y-turns in outline */ - Bool fresh; /* signals a fresh new profile which */ - /* `start' field must be completed */ PProfile cProfile; /* current profile */ PProfile fProfile; /* head of linked list of profiles */ PProfile gProfile; /* contour's first profile in case */ @@ -640,6 +637,9 @@ New_Profile( RAS_ARGS TStates aState, Bool overshoot ) { + Long e; + + if ( !ras.cProfile || ras.cProfile->height ) { ras.cProfile = (PProfile)ras.top; @@ -664,13 +664,14 @@ if ( overshoot ) ras.cProfile->flags |= Overshoot_Bottom; - FT_TRACE7(( " new ascending profile = %p\n", (void *)ras.cProfile )); + e = CEILING( ras.lastY ); break; case Descending_State: if ( overshoot ) ras.cProfile->flags |= Overshoot_Top; - FT_TRACE7(( " new descending profile = %p\n", (void *)ras.cProfile )); + + e = FLOOR( ras.lastY ); break; default: @@ -679,8 +680,20 @@ return FAILURE; } + if ( e > ras.maxY ) + e = ras.maxY; + if ( e < ras.minY ) + e = ras.minY; + ras.cProfile->start = (Int)TRUNC( e ); + + FT_TRACE7(( " new %s profile = %p, start = %d\n", + aState == Ascending_State ? "ascending" : "descending", + (void *)ras.cProfile, ras.cProfile->start )); + + if ( ras.lastY == e ) + *ras.top++ = ras.lastX; + ras.state = aState; - ras.fresh = TRUE; return SUCCESS; } @@ -927,29 +940,23 @@ Long Ix, Rx, Ax; Int size; - PLong top; + PLong top; - top = ras.top; - if ( y2 == y1 || y2 < miny || y1 > maxy ) - goto Fin; + return SUCCESS; e2 = y2 > maxy ? maxy : FLOOR( y2 ); e = y1 < miny ? miny : CEILING( y1 ); - if ( e2 < e ) /* between scanlines */ - goto Fin; + if ( y1 == e ) + e += ras.precision; - if ( ras.fresh ) - { - ras.cProfile->start = (Int)TRUNC( e ); - ras.fresh = FALSE; - } - else if ( y1 == e ) - top--; + if ( e2 < e ) /* nothing to do */ + return SUCCESS; size = (Int)TRUNC( e2 - e ) + 1; + top = ras.top; if ( top + size >= ras.maxBuff ) { @@ -1045,17 +1052,7 @@ Long miny, Long maxy ) { - Bool result, fresh; - - - fresh = ras.fresh; - - result = Line_Up( RAS_VARS x1, -y1, x2, -y2, -maxy, -miny ); - - if ( fresh && !ras.fresh ) - ras.cProfile->start = -ras.cProfile->start; - - return result; + return Line_Up( RAS_VARS x1, -y1, x2, -y2, -maxy, -miny ); } @@ -1098,35 +1095,25 @@ Long y1, y2, e, e2, dy; Long dx, x2; - PLong top; + PLong top; y1 = arc[degree].y; y2 = arc[0].y; - top = ras.top; if ( y2 < miny || y1 > maxy ) - goto Fin; + return SUCCESS; e2 = y2 > maxy ? maxy : FLOOR( y2 ); e = y1 < miny ? miny : CEILING( y1 ); - if ( e2 < e ) /* between scanlines */ - goto Fin; + if ( y1 == e ) + e += ras.precision; - if ( ras.fresh ) - { - ras.cProfile->start = (Int)TRUNC( e ); - ras.fresh = FALSE; - } - else if ( y1 == e ) - top--; + if ( e2 < e ) /* nothing to do */ + return SUCCESS; - if ( y1 == e ) - { - *top++ = arc[degree].x; - e += ras.precision; - } + top = ras.top; if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { @@ -1134,7 +1121,7 @@ return FAILURE; } - while ( e <= e2 ) + do { y2 = arc[0].y; x2 = arc[0].x; @@ -1169,9 +1156,9 @@ arc -= degree; } } + while ( e <= e2 ); - Fin: - ras.top = top; + ras.top = top; return SUCCESS; } @@ -1208,7 +1195,7 @@ Long miny, Long maxy ) { - Bool result, fresh; + Bool result; arc[0].y = -arc[0].y; @@ -1217,13 +1204,8 @@ if ( degree > 2 ) arc[3].y = -arc[3].y; - fresh = ras.fresh; - result = Bezier_Up( RAS_VARS degree, arc, splitter, -maxy, -miny ); - if ( fresh && !ras.fresh ) - ras.cProfile->start = -ras.cProfile->start; - arc[0].y = -arc[0].y; return result; } @@ -1437,13 +1419,13 @@ ras.minY, ras.maxY ) ) goto Fail; arc -= 2; + + ras.lastX = x3; + ras.lastY = y3; } } while ( arc >= arcs ); - ras.lastX = x3; - ras.lastY = y3; - return SUCCESS; Fail: @@ -1584,13 +1566,13 @@ ras.minY, ras.maxY ) ) goto Fail; arc -= 3; + + ras.lastX = x4; + ras.lastY = y4; } } while ( arc >= arcs ); - ras.lastX = x4; - ras.lastY = y4; - return SUCCESS; Fail: From 6e7ef1687ffd314f497eb9adbca9a92eec07ecca Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 13 Nov 2023 22:07:42 -0500 Subject: [PATCH 066/191] * src/raster/ftraster.c (Increment): Minor tweak. --- src/raster/ftraster.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index d2f56942f..c0a73366a 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1978,17 +1978,14 @@ if ( !current ) return; - next = current->link; - - while ( next ) + while ( current->link ) { + next = current->link; + if ( current->X <= next->X ) { old = ¤t->link; - current = *old; - - if ( !current ) - return; + current = next; } else { @@ -1996,11 +1993,10 @@ current->link = next->link; next->link = current; + /* Restarting */ old = list; current = *old; } - - next = current->link; } } From 0f98994ef6f71596890d98444f70b448c9bf0bdc Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 13 Nov 2023 23:15:00 -0500 Subject: [PATCH 067/191] * include/freetype/ftimage.h: Fix type and link. --- include/freetype/ftimage.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 6baa81256..637a761f0 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -318,7 +318,7 @@ FT_BEGIN_HEADER * * If bit~2 is set, bits 5-7 contain the drop-out mode (as defined in * the OpenType specification; the value is the same as the argument to - * the 'SCANMODE' instruction). + * the 'SCANTYPE' instruction). * * Bits 3 and~4 are reserved for internal purposes. * @@ -434,8 +434,8 @@ FT_BEGIN_HEADER * rasterizer; see the `tags` field in @FT_Outline. * * Please refer to the description of the 'SCANTYPE' instruction in the - * OpenType specification (in file `ttinst1.doc`) how simple drop-outs, - * smart drop-outs, and stubs are defined. + * [OpenType specification](https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions#scantype) + * how simple drop-outs, smart drop-outs, and stubs are defined. */ #define FT_OUTLINE_NONE 0x0 #define FT_OUTLINE_OWNER 0x1 From 667aad581a0419d2180087ee1c7e7d7dfac8462f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 14 Nov 2023 15:10:52 +0000 Subject: [PATCH 068/191] * src/raster/ftraster.c (Conic_To, Cubic_To): Fix recent regression. --- src/raster/ftraster.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index c0a73366a..fae28b849 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1384,6 +1384,9 @@ { /* this arc is flat, ignore it and pop it from the Bezier stack */ arc -= 2; + + ras.lastX = x3; + ras.lastY = y3; } else { @@ -1532,6 +1535,9 @@ { /* this arc is flat, ignore it and pop it from the Bezier stack */ arc -= 3; + + ras.lastX = x4; + ras.lastY = y4; } else { From d1b3ef77042df64d3094695fc6221ac6b757f543 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 14 Nov 2023 15:54:52 +0000 Subject: [PATCH 069/191] [raster] Revise overshoot setting. * src/raster/ftraster.c (New_Profile, End_Profile): Deal with overshoots locally. (Line_To, Conic_To, Cubic_To): Update callers. --- src/raster/ftraster.c | 67 ++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 43 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index fae28b849..cd87b9592 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -634,8 +634,7 @@ * profile. */ static Bool - New_Profile( RAS_ARGS TStates aState, - Bool overshoot ) + New_Profile( RAS_ARGS TStates aState ) { Long e; @@ -661,14 +660,14 @@ { case Ascending_State: ras.cProfile->flags |= Flow_Up; - if ( overshoot ) + if ( IS_BOTTOM_OVERSHOOT( ras.lastY ) ) ras.cProfile->flags |= Overshoot_Bottom; e = CEILING( ras.lastY ); break; case Descending_State: - if ( overshoot ) + if ( IS_TOP_OVERSHOOT( ras.lastY ) ) ras.cProfile->flags |= Overshoot_Top; e = FLOOR( ras.lastY ); @@ -716,7 +715,7 @@ * SUCCESS on success. FAILURE in case of overflow or incoherency. */ static Bool - End_Profile( RAS_ARGS Bool overshoot ) + End_Profile( RAS_ARG ) { PProfile p = ras.cProfile; Int h = (Int)( ras.top - p->x ); @@ -735,11 +734,14 @@ FT_TRACE7(( " ending profile %p, start = %2d, height = %+3d\n", (void *)p, p->start, p->flags & Flow_Up ? h : -h )); - if ( overshoot ) + if ( p->flags & Flow_Up ) { - if ( p->flags & Flow_Up ) + if ( IS_TOP_OVERSHOOT( ras.lastY ) ) p->flags |= Overshoot_Top; - else + } + else + { + if ( IS_BOTTOM_OVERSHOOT( ras.lastY ) ) p->flags |= Overshoot_Bottom; } @@ -1243,25 +1245,21 @@ case Unknown_State: if ( y > ras.lastY ) { - if ( New_Profile( RAS_VARS Ascending_State, - IS_BOTTOM_OVERSHOOT( ras.lastY ) ) ) + if ( New_Profile( RAS_VARS Ascending_State ) ) return FAILURE; } - else + else if ( y < ras.lastY ) { - if ( y < ras.lastY ) - if ( New_Profile( RAS_VARS Descending_State, - IS_TOP_OVERSHOOT( ras.lastY ) ) ) - return FAILURE; + if ( New_Profile( RAS_VARS Descending_State ) ) + return FAILURE; } break; case Ascending_State: if ( y < ras.lastY ) { - if ( End_Profile( RAS_VARS IS_TOP_OVERSHOOT( ras.lastY ) ) || - New_Profile( RAS_VARS Descending_State, - IS_TOP_OVERSHOOT( ras.lastY ) ) ) + if ( End_Profile( RAS_VAR ) || + New_Profile( RAS_VARS Descending_State ) ) return FAILURE; } break; @@ -1269,9 +1267,8 @@ case Descending_State: if ( y > ras.lastY ) { - if ( End_Profile( RAS_VARS IS_BOTTOM_OVERSHOOT( ras.lastY ) ) || - New_Profile( RAS_VARS Ascending_State, - IS_BOTTOM_OVERSHOOT( ras.lastY ) ) ) + if ( End_Profile( RAS_VAR ) || + New_Profile( RAS_VARS Ascending_State ) ) return FAILURE; } break; @@ -1395,18 +1392,13 @@ state_bez = y1 < y3 ? Ascending_State : Descending_State; if ( ras.state != state_bez ) { - Bool o = ( state_bez == Ascending_State ) - ? IS_BOTTOM_OVERSHOOT( y1 ) - : IS_TOP_OVERSHOOT( y1 ); - - /* finalize current profile if any */ if ( ras.state != Unknown_State && - End_Profile( RAS_VARS o ) ) + End_Profile( RAS_VAR ) ) goto Fail; /* create a new profile */ - if ( New_Profile( RAS_VARS state_bez, o ) ) + if ( New_Profile( RAS_VARS state_bez ) ) goto Fail; } @@ -1541,22 +1533,17 @@ } else { - state_bez = ( y1 <= y4 ) ? Ascending_State : Descending_State; + state_bez = y1 < y4 ? Ascending_State : Descending_State; /* detect a change of direction */ if ( ras.state != state_bez ) { - Bool o = ( state_bez == Ascending_State ) - ? IS_BOTTOM_OVERSHOOT( y1 ) - : IS_TOP_OVERSHOOT( y1 ); - - /* finalize current profile if any */ if ( ras.state != Unknown_State && - End_Profile( RAS_VARS o ) ) + End_Profile( RAS_VAR ) ) goto Fail; - if ( New_Profile( RAS_VARS state_bez, o ) ) + if ( New_Profile( RAS_VARS state_bez ) ) goto Fail; } @@ -1865,9 +1852,6 @@ last = -1; for ( i = 0; i < ras.outline.n_contours; i++ ) { - Bool o; - - ras.state = Unknown_State; ras.gProfile = NULL; @@ -1890,10 +1874,7 @@ ( ras.cProfile->flags & Flow_Up ) ) ras.top--; - o = ras.cProfile->flags & Flow_Up ? IS_TOP_OVERSHOOT( ras.lastY ) - : IS_BOTTOM_OVERSHOOT( ras.lastY ); - - if ( End_Profile( RAS_VARS o ) ) + if ( End_Profile( RAS_VAR ) ) return FAILURE; if ( !ras.fProfile ) From aec7e717fb9fd962cef5302609af0cf423db7499 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 14 Nov 2023 16:47:34 +0000 Subject: [PATCH 070/191] [raster] Stylistic changes. * src/raster/ftraster.c (Line_To): Code it similar to curves; shortcut the flat lines here... (Line_Up): ... instead of here. --- src/raster/ftraster.c | 75 ++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 47 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index cd87b9592..5adae0bee 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -945,7 +945,7 @@ PLong top; - if ( y2 == y1 || y2 < miny || y1 > maxy ) + if ( y2 < miny || y1 > maxy ) return SUCCESS; e2 = y2 > maxy ? maxy : FLOOR( y2 ); @@ -1238,69 +1238,50 @@ Line_To( RAS_ARGS Long x, Long y ) { - /* First, detect a change of direction */ + TStates state; - switch ( ras.state ) - { - case Unknown_State: - if ( y > ras.lastY ) - { - if ( New_Profile( RAS_VARS Ascending_State ) ) - return FAILURE; - } - else if ( y < ras.lastY ) - { - if ( New_Profile( RAS_VARS Descending_State ) ) - return FAILURE; - } - break; - case Ascending_State: - if ( y < ras.lastY ) - { - if ( End_Profile( RAS_VAR ) || - New_Profile( RAS_VARS Descending_State ) ) - return FAILURE; - } - break; + if ( y == ras.lastY ) + goto Fin; - case Descending_State: - if ( y > ras.lastY ) - { - if ( End_Profile( RAS_VAR ) || - New_Profile( RAS_VARS Ascending_State ) ) - return FAILURE; - } - break; + /* First, detect a change of direction */ - default: - ; + state = ras.lastY < y ? Ascending_State : Descending_State; + + if ( ras.state != state ) + { + /* finalize current profile if any */ + if ( ras.state != Unknown_State && + End_Profile( RAS_VAR ) ) + goto Fail; + + /* create a new profile */ + if ( New_Profile( RAS_VARS state ) ) + goto Fail; } /* Then compute the lines */ - switch ( ras.state ) + if ( state == Ascending_State ) { - case Ascending_State: if ( Line_Up( RAS_VARS ras.lastX, ras.lastY, x, y, ras.minY, ras.maxY ) ) - return FAILURE; - break; - - case Descending_State: + goto Fail; + } + else + { if ( Line_Down( RAS_VARS ras.lastX, ras.lastY, x, y, ras.minY, ras.maxY ) ) - return FAILURE; - break; - - default: - ; + goto Fail; } + Fin: ras.lastX = x; ras.lastY = y; - return SUCCESS; + + Fail: + return FAILURE; } @@ -1949,7 +1930,7 @@ { current = *old; if ( --current->height ) - { + { current->offset += ( current->flags & Flow_Up ) ? 1 : -1; current->X = current->x[current->offset]; old = ¤t->link; From 6dc2ecb75729659c7dd8a92e21995db6622757fe Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 14 Nov 2023 23:06:41 -0500 Subject: [PATCH 071/191] * src/raster/ftraster.c: Comments. --- src/raster/ftraster.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 5adae0bee..26e85d767 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -625,10 +625,6 @@ * aState :: * The state/orientation of the new profile. * - * overshoot :: - * Whether the profile's unrounded start position - * differs by at least a half pixel. - * * @Return: * SUCCESS on success. FAILURE in case of overflow or of incoherent * profile. @@ -706,11 +702,6 @@ * @Description: * Finalize the current profile and record y-turns. * - * @Input: - * overshoot :: - * Whether the profile's unrounded end position differs - * by at least a half pixel. - * * @Return: * SUCCESS on success. FAILURE in case of overflow or incoherency. */ @@ -1588,6 +1579,11 @@ * * @Return: * SUCCESS on success, FAILURE on error. + * + * @Note: + * Unlike FT_Outline_Decompose(), this function handles the scanmode + * dropout tags in the individual contours. Therefore, it cannot be + * replaced. */ static Bool Decompose_Curve( RAS_ARGS Int first, From b0265ccd336cafce6865f6f260e9b61d69459b7e Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 14 Nov 2023 23:32:06 -0500 Subject: [PATCH 072/191] [raster] Dissolve a loop. * src/raster/ftraster.c (End_Profile): Set initial `X` here... (Draw_Sweep): ... instead of here; delay the `start` decrement. --- src/raster/ftraster.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 26e85d767..5dee0128c 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -752,6 +752,8 @@ p->offset = h - 1; } + p->X = p->x[p->offset]; + if ( Insert_Y_Turn( RAS_VARS bottom ) || Insert_Y_Turn( RAS_VARS top ) ) return FAILURE; @@ -2463,21 +2465,10 @@ ras.Proc_Sweep_Init( RAS_VARS min_Y, max_Y ); - /* set the activation countdowns and the initial positions */ - - P = waiting; - while ( P ) - { - P->start -= min_Y; - P->X = P->x[P->offset]; - - P = P->link; - } - /* let's go, iterating through y_turns */ y = min_Y; - y_height = 0; + y_height = min_Y; while ( ++ras.maxBuff < ras.sizeBuff ) { From c580926f354108c1e693364dbe9e64af2d11038a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 15 Nov 2023 15:17:50 +0000 Subject: [PATCH 073/191] * src/raster/ftraster.c (Draw_Sweep): Use more natural loop. --- src/raster/ftraster.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 5dee0128c..d20d4a0ec 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -317,6 +317,7 @@ #define Flow_Up 0x08U #define Overshoot_Top 0x10U #define Overshoot_Bottom 0x20U +#define Dropout 0x40U /* States of each line, arc, and profile */ @@ -2447,7 +2448,7 @@ Draw_Sweep( RAS_ARG ) { Int min_Y, max_Y, dropouts; - Int y, y_change, y_height; + Int y, y_turn; PProfile *Q, P, P_Left, P_Right; @@ -2465,12 +2466,9 @@ ras.Proc_Sweep_Init( RAS_VARS min_Y, max_Y ); - /* let's go, iterating through y_turns */ + /* let's go */ - y = min_Y; - y_height = min_Y; - - while ( ++ras.maxBuff < ras.sizeBuff ) + for ( y = min_Y; y <= max_Y; ) { /* check waiting list for new profile activations */ @@ -2478,8 +2476,7 @@ while ( *Q ) { P = *Q; - P->start -= y_height; - if ( P->start == 0 ) + if ( P->start == y ) { *Q = P->link; /* remove */ @@ -2492,8 +2489,7 @@ Q = &P->link; } - y_change = (Int)*ras.maxBuff; - y_height = y_change - y; + y_turn = (Int)*++ras.maxBuff; do { @@ -2530,7 +2526,7 @@ P_Right->X = x2; /* mark profile for drop-out processing */ - P_Left->start = -1; + P_Left->flags |= Dropout; dropouts++; } } @@ -2554,7 +2550,7 @@ Increment( &draw_left ); Increment( &draw_right ); } - while ( ++y < y_change ); + while ( ++y < y_turn ); } return SUCCESS; @@ -2566,9 +2562,9 @@ while ( P_Left && P_Right ) { - if ( P_Left->start ) + if ( P_Left->flags & Dropout ) { - P_Left->start = 0; + P_Left->flags &= ~Dropout; #if 0 dropouts--; /* -- this is useful when debugging only */ #endif From fa59e0d64c09bef9a328f181d8de56e0c41e2875 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 15 Nov 2023 16:55:57 +0000 Subject: [PATCH 074/191] * src/raster/ftraster.c (End_Profile): Reduce branching. (InsNew): Tweak condition. --- src/raster/ftraster.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index d20d4a0ec..ea87ab105 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -347,6 +347,7 @@ /* Bit 3: profile orientation (up/down) */ /* Bit 4: is top profile? */ /* Bit 5: is bottom profile? */ + /* Bit 6: dropout detected */ FT_F26Dot6 X; /* current coordinate during sweep */ Long x[1]; /* actually variable array of scanline */ @@ -726,35 +727,30 @@ FT_TRACE7(( " ending profile %p, start = %2d, height = %+3d\n", (void *)p, p->start, p->flags & Flow_Up ? h : -h )); + p->height = h; + if ( p->flags & Flow_Up ) { if ( IS_TOP_OVERSHOOT( ras.lastY ) ) p->flags |= Overshoot_Top; - } - else - { - if ( IS_BOTTOM_OVERSHOOT( ras.lastY ) ) - p->flags |= Overshoot_Bottom; - } - p->height = h; - - if ( p->flags & Flow_Up ) - { bottom = p->start; top = bottom + h; p->offset = 0; + p->X = p->x[0]; } else { + if ( IS_BOTTOM_OVERSHOOT( ras.lastY ) ) + p->flags |= Overshoot_Bottom; + top = p->start + 1; bottom = top - h; p->start = bottom; p->offset = h - 1; + p->X = p->x[h - 1]; } - p->X = p->x[p->offset]; - if ( Insert_Y_Turn( RAS_VARS bottom ) || Insert_Y_Turn( RAS_VARS top ) ) return FAILURE; @@ -1881,7 +1877,7 @@ * * InsNew * - * Inserts a new profile in a linked list. + * Inserts a new profile in a linked list, sorted by coordinate. */ static void InsNew( PProfileList list, @@ -1895,10 +1891,8 @@ current = *old; x = profile->X; - while ( current ) + while ( current && current->X < x ) { - if ( x < current->X ) - break; old = ¤t->link; current = *old; } From 050a3207641359e4b76994bd671a2f5e567bb74a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 15 Nov 2023 23:41:56 -0500 Subject: [PATCH 075/191] [raster] Keep only bottom y-turns. This results in noticeable performance improvement. * src/raster/ftraster.c (Insert_Y_Turns): All bottom y-turns are still sorted and stored; only the maximum top y-turn is recorded now. The function is renamed. (End_Profile): Updated accordingly. (Convert_Glyph): Reserve space for the top value. --- src/raster/ftraster.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index ea87ab105..7f1077ca3 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -116,8 +116,8 @@ * generated until the end of the outline. * * Note that, for all generated profiles, the function End_Profile() - * is used to record their bottom-most scanline as well as the - * scanline above its upmost boundary. These positions are called + * is used to record all their bottom-most scanlines as well as the + * scanline above their upmost boundary. These positions are called * `y-turns' because they (sort of) correspond to local extrema. * They are stored in a sorted list built from the top of the render * pool as a downwards stack: @@ -579,12 +579,17 @@ * SUCCESS on success. FAILURE in case of overflow. */ static Bool - Insert_Y_Turn( RAS_ARGS Int y ) + Insert_Y_Turns( RAS_ARGS Int y, + Int top ) { Int n = ras.numTurns; PLong y_turns = ras.maxBuff; + /* update top value */ + if ( n == 0 || top > y_turns[n] ) + y_turns[n] = top; + /* look for first y value that is <= */ while ( n-- && y < y_turns[n] ) ; @@ -751,8 +756,7 @@ p->X = p->x[h - 1]; } - if ( Insert_Y_Turn( RAS_VARS bottom ) || - Insert_Y_Turn( RAS_VARS top ) ) + if ( Insert_Y_Turns( RAS_VARS bottom, top ) ) return FAILURE; if ( !ras.gProfile ) @@ -1820,7 +1824,7 @@ ras.cProfile = NULL; ras.top = ras.buff; - ras.maxBuff = ras.sizeBuff; + ras.maxBuff = ras.sizeBuff - 1; /* top reserve */ ras.numTurns = 0; ras.num_Profs = 0; From e969289f88a586c40678133abcf999362aefe565 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 16 Nov 2023 20:02:08 +0000 Subject: [PATCH 076/191] * docs/CHANGES: Updated. --- docs/CHANGES | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/CHANGES b/docs/CHANGES index 96cf607d7..ba40d8d92 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,3 +1,19 @@ +CHANGES BETWEEN 2.13.2 and 2.13.3 (202Y-Mmm-DD) + + I. IMPORTANT BUG FIXES + + - Excessive stack allocation in the autohinter has been fixed. + + + II. MISCELLANEOUS + + - The B/W rasterizer has received a major upkeep that resulted in + large performance improvement. The rendering speed has increased + and even doubled for very complex glyphs. + + +====================================================================== + CHANGES BETWEEN 2.13.1 and 2.13.2 (2023-Aug-25) I. MISCELLANEOUS From d7c72ff919152959e25096d235bd2ad4b37552ed Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 20 Nov 2023 22:46:36 -0500 Subject: [PATCH 077/191] [raster] Use bitwise dropout mode interpretation. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Draw_Sweep, Render_GLyph): Interpret dropout mode using bit masks. --- src/raster/ftraster.c | 110 ++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 73 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 7f1077ca3..3fc4c53f3 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2082,15 +2082,11 @@ /* pixel contour contour pixel */ /* center center */ - /* drop-out mode scan conversion rules (as defined in OpenType) */ - /* --------------------------------------------------------------- */ - /* 0 1, 2, 3 */ - /* 1 1, 2, 4 */ - /* 2 1, 2 */ - /* 3 same as mode 2 */ - /* 4 1, 2, 5 */ - /* 5 1, 2, 6 */ - /* 6, 7 same as mode 2 */ + /* drop-out mode scan conversion rules (OpenType specs) */ + /* ------------------------------------------------------- */ + /* bit 0 exclude stubs if set */ + /* bit 1 ignore drop-outs if set */ + /* bit 2 smart rounding if set */ e1 = CEILING( x1 ); e2 = FLOOR ( x2 ); @@ -2103,19 +2099,6 @@ if ( e1 == e2 + ras.precision ) { - switch ( dropOutControl ) - { - case 0: /* simple drop-outs including stubs */ - pxl = e2; - break; - - case 4: /* smart drop-outs including stubs */ - pxl = SMART( x1, x2 ); - break; - - case 1: /* simple drop-outs excluding stubs */ - case 5: /* smart drop-outs excluding stubs */ - /* Drop-out Control Rules #4 and #6 */ /* The specification neither provides an exact definition */ @@ -2142,30 +2125,28 @@ /* - the covered interval is greater or equal to a half */ /* pixel */ - /* upper stub test */ + if ( dropOutControl & 1 ) + { + /* rightmost stub test */ if ( left->next == right && left->height == 1 && !( left->flags & Overshoot_Top && x2 - x1 >= ras.precision_half ) ) goto Exit; - /* lower stub test */ + /* leftmost stub test */ if ( right->next == left && left->offset == 0 && !( left->flags & Overshoot_Bottom && x2 - x1 >= ras.precision_half ) ) goto Exit; - - if ( dropOutControl == 1 ) - pxl = e2; - else - pxl = SMART( x1, x2 ); - break; - - default: /* modes 2, 3, 6, 7 */ - goto Exit; /* no drop-out control */ } + if ( dropOutControl & 4 ) + pxl = SMART( x1, x2 ); + else + pxl = e2; + /* undocumented but confirmed: If the drop-out would result in a */ /* pixel outside of the bounding box, use the pixel inside of the */ /* bounding box instead */ @@ -2346,20 +2327,8 @@ if ( e1 == e2 + ras.precision ) { - switch ( dropOutControl ) + if ( dropOutControl & 1 ) { - case 0: /* simple drop-outs including stubs */ - pxl = e2; - break; - - case 4: /* smart drop-outs including stubs */ - pxl = SMART( x1, x2 ); - break; - - case 1: /* simple drop-outs excluding stubs */ - case 5: /* smart drop-outs excluding stubs */ - /* see Vertical_Sweep_Drop for details */ - /* rightmost stub test */ if ( left->next == right && left->height == 1 && @@ -2373,17 +2342,13 @@ !( left->flags & Overshoot_Bottom && x2 - x1 >= ras.precision_half ) ) goto Exit; - - if ( dropOutControl == 1 ) - pxl = e2; - else - pxl = SMART( x1, x2 ); - break; - - default: /* modes 2, 3, 6, 7 */ - goto Exit; /* no drop-out control */ } + if ( dropOutControl & 4 ) + pxl = SMART( x1, x2 ); + else + pxl = e2; + /* undocumented but confirmed: If the drop-out would result in a */ /* pixel outside of the bounding box, use the pixel inside of the */ /* bounding box instead */ @@ -2518,19 +2483,20 @@ Int dropOutControl = P_Left->flags & 7; - if ( dropOutControl != 2 ) - { - P_Left ->X = x1; - P_Right->X = x2; + if ( dropOutControl & 2 ) + goto Next_Pair; - /* mark profile for drop-out processing */ - P_Left->flags |= Dropout; - dropouts++; - } + P_Left ->X = x1; + P_Right->X = x2; + + /* mark profile for drop-out processing */ + P_Left->flags |= Dropout; + dropouts++; } else ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right ); + Next_Pair: P_Left = P_Left->link; P_Right = P_Right->link; } @@ -2769,18 +2735,16 @@ Set_High_Precision( RAS_VARS ras.outline.flags & FT_OUTLINE_HIGH_PRECISION ); + ras.dropOutControl = 0; + if ( ras.outline.flags & FT_OUTLINE_IGNORE_DROPOUTS ) - ras.dropOutControl = 2; - else - { - if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS ) - ras.dropOutControl = 4; - else - ras.dropOutControl = 0; + ras.dropOutControl |= 2; - if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) ) - ras.dropOutControl += 1; - } + if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS ) + ras.dropOutControl |= 4; + + if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) ) + ras.dropOutControl |= 1; FT_TRACE6(( "BW Raster: precision 1/%d, dropout mode %d\n", ras.precision, ras.dropOutControl )); From da8e4289776316bf2d13dc5fcb83def745ee3810 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 Nov 2023 00:53:50 -0500 Subject: [PATCH 078/191] [raster] Rearrange dropout control. This reduces the code duplication. * src/raster/ftraster.c (Function_Sweep_Span): Change signature. (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Focus on pixel setting and move duplicated the dropout control logic to... (Draw_Sweep): ... this function and refactor. (Vertical_Sweep_Span, Horizontal_Sweep_Span): Minor. --- src/raster/ftraster.c | 375 ++++++++++++++---------------------------- 1 file changed, 128 insertions(+), 247 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 3fc4c53f3..2a84aef3a 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -401,9 +401,7 @@ typedef void Function_Sweep_Span( RAS_ARGS Int y, FT_F26Dot6 x1, - FT_F26Dot6 x2, - PProfile left, - PProfile right ); + FT_F26Dot6 x2 ); typedef void Function_Sweep_Step( RAS_ARG ); @@ -1989,15 +1987,11 @@ static void Vertical_Sweep_Span( RAS_ARGS Int y, FT_F26Dot6 x1, - FT_F26Dot6 x2, - PProfile left, - PProfile right ) + FT_F26Dot6 x2 ) { Int e1, e2; FT_UNUSED( y ); - FT_UNUSED( left ); - FT_UNUSED( right ); FT_TRACE7(( " y=%d x=[% .*f;% .*f]", @@ -2054,137 +2048,38 @@ static void Vertical_Sweep_Drop( RAS_ARGS Int y, FT_F26Dot6 x1, - FT_F26Dot6 x2, - PProfile left, - PProfile right ) + FT_F26Dot6 x2 ) { - Long e1, e2, pxl; - Int c1, f1; + Int e1 = (Int)TRUNC( x1 ); + Int e2 = (Int)TRUNC( x2 ); + Int c1, f1; FT_UNUSED( y ); - FT_TRACE7(( " y=%d x=[% .*f;% .*f]", - y, - ras.precision_bits, (double)x1 / (double)ras.precision, - ras.precision_bits, (double)x2 / (double)ras.precision )); + /* undocumented but confirmed: If the drop-out would result in a */ + /* pixel outside of the bounding box, use the pixel inside of the */ + /* bounding box instead */ + if ( e1 < 0 || e1 > ras.bRight ) + e1 = e2; - /* Drop-out control */ - - /* e2 x2 x1 e1 */ - /* */ - /* ^ | */ - /* | | */ - /* +-------------+---------------------+------------+ */ - /* | | */ - /* | v */ - /* */ - /* pixel contour contour pixel */ - /* center center */ - - /* drop-out mode scan conversion rules (OpenType specs) */ - /* ------------------------------------------------------- */ - /* bit 0 exclude stubs if set */ - /* bit 1 ignore drop-outs if set */ - /* bit 2 smart rounding if set */ - - e1 = CEILING( x1 ); - e2 = FLOOR ( x2 ); - pxl = e1; - - if ( e1 > e2 ) + /* otherwise check that the other pixel isn't set */ + else if ( e2 >=0 && e2 <= ras.bRight ) { - Int dropOutControl = left->flags & 7; - - - if ( e1 == e2 + ras.precision ) - { - /* Drop-out Control Rules #4 and #6 */ - - /* The specification neither provides an exact definition */ - /* of a `stub' nor gives exact rules to exclude them. */ - /* */ - /* Here the constraints we use to recognize a stub. */ - /* */ - /* upper stub: */ - /* */ - /* - P_Left and P_Right are in the same contour */ - /* - P_Right is the successor of P_Left in that contour */ - /* - y is the top of P_Left and P_Right */ - /* */ - /* lower stub: */ - /* */ - /* - P_Left and P_Right are in the same contour */ - /* - P_Left is the successor of P_Right in that contour */ - /* - y is the bottom of P_Left */ - /* */ - /* We draw a stub if the following constraints are met. */ - /* */ - /* - for an upper or lower stub, there is top or bottom */ - /* overshoot, respectively */ - /* - the covered interval is greater or equal to a half */ - /* pixel */ - - if ( dropOutControl & 1 ) - { - /* rightmost stub test */ - if ( left->next == right && - left->height == 1 && - !( left->flags & Overshoot_Top && - x2 - x1 >= ras.precision_half ) ) - goto Exit; - - /* leftmost stub test */ - if ( right->next == left && - left->offset == 0 && - !( left->flags & Overshoot_Bottom && - x2 - x1 >= ras.precision_half ) ) - goto Exit; - } + c1 = (Int)( e2 >> 3 ); + f1 = (Int)( e2 & 7 ); - if ( dropOutControl & 4 ) - pxl = SMART( x1, x2 ); - else - pxl = e2; - - /* undocumented but confirmed: If the drop-out would result in a */ - /* pixel outside of the bounding box, use the pixel inside of the */ - /* bounding box instead */ - if ( pxl < 0 ) - pxl = e1; - else if ( TRUNC( pxl ) > ras.bRight ) - pxl = e2; - - /* check that the other pixel isn't set */ - e1 = ( pxl == e1 ) ? e2 : e1; - - e1 = TRUNC( e1 ); - - c1 = (Int)( e1 >> 3 ); - f1 = (Int)( e1 & 7 ); - - if ( e1 >= 0 && e1 <= ras.bRight && - ras.bLine[c1] & ( 0x80 >> f1 ) ) - goto Exit; - } - else - goto Exit; + if ( ras.bLine[c1] & ( 0x80 >> f1 ) ) + return; } - e1 = TRUNC( pxl ); - if ( e1 >= 0 && e1 <= ras.bRight ) { - FT_TRACE7(( " -> x=%ld", e1 )); - c1 = (Int)( e1 >> 3 ); f1 = (Int)( e1 & 7 ); ras.bLine[c1] |= 0x80 >> f1; } - - Exit: - FT_TRACE7(( " dropout=%d\n", left->flags & 7 )); } @@ -2218,15 +2113,10 @@ static void Horizontal_Sweep_Span( RAS_ARGS Int y, FT_F26Dot6 x1, - FT_F26Dot6 x2, - PProfile left, - PProfile right ) + FT_F26Dot6 x2 ) { Long e1, e2; - FT_UNUSED( left ); - FT_UNUSED( right ); - FT_TRACE7(( " x=%d y=[% .*f;% .*f]", y, @@ -2290,103 +2180,37 @@ static void Horizontal_Sweep_Drop( RAS_ARGS Int y, FT_F26Dot6 x1, - FT_F26Dot6 x2, - PProfile left, - PProfile right ) + FT_F26Dot6 x2 ) { - Long e1, e2, pxl; + Int e1 = (Int)TRUNC( x1 ); + Int e2 = (Int)TRUNC( x2 ); PByte bits; Int f1; - FT_TRACE7(( " x=%d y=[% .*f;% .*f]", - y, - ras.precision_bits, (double)x1 / (double)ras.precision, - ras.precision_bits, (double)x2 / (double)ras.precision )); - - /* During the horizontal sweep, we only take care of drop-outs */ - - /* e1 + <-- pixel center */ - /* | */ - /* x1 ---+--> <-- contour */ - /* | */ - /* | */ - /* x2 <--+--- <-- contour */ - /* | */ - /* | */ - /* e2 + <-- pixel center */ + /* undocumented but confirmed: If the drop-out would result in a */ + /* pixel outside of the bounding box, use the pixel inside of the */ + /* bounding box instead */ + if ( e1 < 0 || e1 > ras.bTop ) + e1 = e2; - e1 = CEILING( x1 ); - e2 = FLOOR ( x2 ); - pxl = e1; - - if ( e1 > e2 ) + /* otherwise check that the other pixel isn't set */ + else if ( e2 >=0 && e2 <= ras.bTop ) { - Int dropOutControl = left->flags & 7; - - - if ( e1 == e2 + ras.precision ) - { - if ( dropOutControl & 1 ) - { - /* rightmost stub test */ - if ( left->next == right && - left->height == 1 && - !( left->flags & Overshoot_Top && - x2 - x1 >= ras.precision_half ) ) - goto Exit; - - /* leftmost stub test */ - if ( right->next == left && - left->offset == 0 && - !( left->flags & Overshoot_Bottom && - x2 - x1 >= ras.precision_half ) ) - goto Exit; - } - - if ( dropOutControl & 4 ) - pxl = SMART( x1, x2 ); - else - pxl = e2; - - /* undocumented but confirmed: If the drop-out would result in a */ - /* pixel outside of the bounding box, use the pixel inside of the */ - /* bounding box instead */ - if ( pxl < 0 ) - pxl = e1; - else if ( TRUNC( pxl ) > ras.bTop ) - pxl = e2; + bits = ras.bOrigin + ( y >> 3 ) - e2 * ras.bPitch; + f1 = 0x80 >> ( y & 7 ); - /* check that the other pixel isn't set */ - e1 = ( pxl == e1 ) ? e2 : e1; - - e1 = TRUNC( e1 ); - - bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch; - f1 = 0x80 >> ( y & 7 ); - - if ( e1 >= 0 && e1 <= ras.bTop && - *bits & f1 ) - goto Exit; - } - else - goto Exit; + if ( *bits & f1 ) + return; } - e1 = TRUNC( pxl ); - if ( e1 >= 0 && e1 <= ras.bTop ) { - FT_TRACE7(( " -> y=%ld", e1 )); - bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch; f1 = 0x80 >> ( y & 7 ); - bits[0] |= f1; + *bits |= f1; } - - Exit: - FT_TRACE7(( " dropout=%d\n", left->flags & 7 )); } @@ -2477,37 +2301,120 @@ x2 = xs; } - /* if bottom ceiling exceeds top floor, it is a drop-out */ - if ( CEILING( x1 ) > FLOOR( x2 ) ) + if ( CEILING( x1 ) <= FLOOR( x2 ) ) + ras.Proc_Sweep_Span( RAS_VARS y, x1, x2 ); + + /* otherwise, bottom ceiling > top floor, it is a drop-out */ + else { Int dropOutControl = P_Left->flags & 7; + /* Drop-out control */ + + /* e2 x2 x1 e1 */ + /* */ + /* ^ | */ + /* | | */ + /* +-------------+---------------------+------------+ */ + /* | | */ + /* | v */ + /* */ + /* pixel contour contour pixel */ + /* center center */ + + /* drop-out mode scan conversion rules (OpenType specs) */ + /* ------------------------------------------------------- */ + /* bit 0 exclude stubs if set */ + /* bit 1 ignore drop-outs if set */ + /* bit 2 smart rounding if set */ + if ( dropOutControl & 2 ) goto Next_Pair; - P_Left ->X = x1; - P_Right->X = x2; + /* The specification neither provides an exact definition */ + /* of a `stub' nor gives exact rules to exclude them. */ + /* */ + /* Here the constraints we use to recognize a stub. */ + /* */ + /* upper stub: */ + /* */ + /* - P_Left and P_Right are in the same contour */ + /* - P_Right is the successor of P_Left in that contour */ + /* - y is the top of P_Left and P_Right */ + /* */ + /* lower stub: */ + /* */ + /* - P_Left and P_Right are in the same contour */ + /* - P_Left is the successor of P_Right in that contour */ + /* - y is the bottom of P_Left */ + /* */ + /* We draw a stub if the following constraints are met. */ + /* */ + /* - for an upper or lower stub, there is top or bottom */ + /* overshoot, respectively */ + /* - the covered interval is greater or equal to a half */ + /* pixel */ + + if ( dropOutControl & 1 ) + { + /* rightmost stub test */ + if ( P_Left->next == P_Right && + P_Left->height == 1 && + !( P_Left->flags & Overshoot_Top && + x2 - x1 >= ras.precision_half ) ) + goto Next_Pair; + + /* leftmost stub test */ + if ( P_Right->next == P_Left && + P_Left->offset == 0 && + !( P_Left->flags & Overshoot_Bottom && + x2 - x1 >= ras.precision_half ) ) + goto Next_Pair; + } + + /* select the pixel to set and the other pixel */ + if ( dropOutControl & 4 ) + { + x2 = SMART( x1, x2 ); + x1 = x1 > x2 ? x2 + ras.precision : x2 - ras.precision; + } + else + { + x2 = FLOOR ( x2 ); + x1 = CEILING( x1 ); + } + + P_Left ->X = x2; + P_Right->X = x1; /* mark profile for drop-out processing */ P_Left->flags |= Dropout; dropouts++; } - else - ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right ); Next_Pair: P_Left = P_Left->link; P_Right = P_Right->link; } - /* handle drop-outs _after_ the span drawing -- */ - /* drop-out processing has been moved out of the loop */ - /* for performance tuning */ - if ( dropouts > 0 ) - goto Scan_DropOuts; + /* handle drop-outs _after_ the span drawing */ + P_Left = draw_left; + P_Right = draw_right; + + while ( dropouts && P_Left && P_Right ) + { + if ( P_Left->flags & Dropout ) + { + ras.Proc_Sweep_Drop( RAS_VARS y, P_Left->X, P_Right->X ); - Next_Line: + P_Left->flags &= ~Dropout; + dropouts--; + } + + P_Left = P_Left->link; + P_Right = P_Right->link; + } ras.Proc_Sweep_Step( RAS_VAR ); @@ -2518,32 +2425,6 @@ } return SUCCESS; - - Scan_DropOuts: - - P_Left = draw_left; - P_Right = draw_right; - - while ( P_Left && P_Right ) - { - if ( P_Left->flags & Dropout ) - { - P_Left->flags &= ~Dropout; -#if 0 - dropouts--; /* -- this is useful when debugging only */ -#endif - ras.Proc_Sweep_Drop( RAS_VARS y, - P_Left->X, - P_Right->X, - P_Left, - P_Right ); - } - - P_Left = P_Left->link; - P_Right = P_Right->link; - } - - goto Next_Line; } From d77dd24b412951fea1c649c0514670f9eec8888c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 Nov 2023 15:16:56 +0000 Subject: [PATCH 079/191] [raster] Sweep polishing. * src/raster/ftraster.c (*_Sweep_Span): Polish. (*_Sweep_Drop): Restore tracing, polish. (Draw_Sweep): Simplify the dropout processing loop. --- src/raster/ftraster.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 2a84aef3a..9b2383d84 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1989,7 +1989,8 @@ FT_F26Dot6 x1, FT_F26Dot6 x2 ) { - Int e1, e2; + Int e1 = (Int)TRUNC( CEILING( x1 ) ); + Int e2 = (Int)TRUNC( FLOOR( x2 ) ); FT_UNUSED( y ); @@ -1999,12 +2000,9 @@ ras.precision_bits, (double)x1 / (double)ras.precision, ras.precision_bits, (double)x2 / (double)ras.precision )); - e1 = (Int)TRUNC( CEILING( x1 ) ); - e2 = (Int)TRUNC( FLOOR( x2 ) ); - if ( e2 >= 0 && e1 <= ras.bRight ) { - Byte* target; + PByte target; Int c1, f1, c2, f2; @@ -2066,19 +2064,22 @@ /* otherwise check that the other pixel isn't set */ else if ( e2 >=0 && e2 <= ras.bRight ) { - c1 = (Int)( e2 >> 3 ); - f1 = (Int)( e2 & 7 ); + c1 = e2 >> 3; + f1 = 0x80 >> ( e2 & 7 ); - if ( ras.bLine[c1] & ( 0x80 >> f1 ) ) + if ( ras.bLine[c1] & f1 ) return; } if ( e1 >= 0 && e1 <= ras.bRight ) { - c1 = (Int)( e1 >> 3 ); - f1 = (Int)( e1 & 7 ); + c1 = e1 >> 3; + f1 = 0x80 >> ( e1 & 7 ); + + FT_TRACE7(( " y=%d x=%d%s\n", y, e1, + ras.bLine[c1] & f1 ? " redundant" : "" )); - ras.bLine[c1] |= 0x80 >> f1; + ras.bLine[c1] |= f1; } } @@ -2115,7 +2116,8 @@ FT_F26Dot6 x1, FT_F26Dot6 x2 ) { - Long e1, e2; + Long e1 = CEILING( x1 ); + Long e2 = FLOOR( x2 ); FT_TRACE7(( " x=%d y=[% .*f;% .*f]", @@ -2129,8 +2131,6 @@ /* */ /* XXX: Can we handle horizontal lines better and drop this? */ - e1 = CEILING( x1 ); - if ( x1 == e1 ) { e1 = TRUNC( e1 ); @@ -2151,8 +2151,6 @@ } } - e2 = FLOOR ( x2 ); - if ( x2 == e2 ) { e2 = TRUNC( e2 ); @@ -2209,6 +2207,9 @@ bits = ras.bOrigin + ( y >> 3 ) - e1 * ras.bPitch; f1 = 0x80 >> ( y & 7 ); + FT_TRACE7(( " x=%d y=%d%s\n", y, e1, + *bits & f1 ? " redundant" : "" )); + *bits |= f1; } } @@ -2402,7 +2403,7 @@ P_Left = draw_left; P_Right = draw_right; - while ( dropouts && P_Left && P_Right ) + while ( dropouts ) { if ( P_Left->flags & Dropout ) { From c62027d910167ed81136cbc81e5daa8f37250f5b Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 Nov 2023 16:54:25 +0000 Subject: [PATCH 080/191] * src/raster/ftraster.c (Draw_Sweep): No-fault return. (Render_Single_Pass): Updated. --- src/raster/ftraster.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 9b2383d84..7c143b9d7 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2232,7 +2232,7 @@ * */ - static Bool + static void Draw_Sweep( RAS_ARG ) { Int min_Y, max_Y, dropouts; @@ -2424,8 +2424,6 @@ } while ( ++y < y_turn ); } - - return SUCCESS; } @@ -2578,8 +2576,7 @@ (char*)ras.maxBuff - (char*)ras.top )); if ( ras.fProfile ) - if ( Draw_Sweep( RAS_VAR ) ) - return ras.error; + Draw_Sweep( RAS_VAR ); if ( --band_top < 0 ) break; From df39b017d9b25eb34b396484fc235544cedd0565 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 Nov 2023 18:12:45 +0000 Subject: [PATCH 081/191] * src/raster/ftraster.c (FT_Outline_Get_CBox ) [STANDALONE_]: Removed. --- src/raster/ftraster.c | 88 ------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 7c143b9d7..008d1f650 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2427,94 +2427,6 @@ } -#ifdef STANDALONE_ - - /************************************************************************** - * - * The following functions should only compile in stand-alone mode, - * i.e., when building this component without the rest of FreeType. - * - */ - - /************************************************************************** - * - * @Function: - * FT_Outline_Get_CBox - * - * @Description: - * Return an outline's `control box'. The control box encloses all - * the outline's points, including Bézier control points. Though it - * coincides with the exact bounding box for most glyphs, it can be - * slightly larger in some situations (like when rotating an outline - * that contains Bézier outside arcs). - * - * Computing the control box is very fast, while getting the bounding - * box can take much more time as it needs to walk over all segments - * and arcs in the outline. To get the latter, you can use the - * `ftbbox' component, which is dedicated to this single task. - * - * @Input: - * outline :: - * A pointer to the source outline descriptor. - * - * @Output: - * acbox :: - * The outline's control box. - * - * @Note: - * See @FT_Glyph_Get_CBox for a discussion of tricky fonts. - */ - - static void - FT_Outline_Get_CBox( const FT_Outline* outline, - FT_BBox *acbox ) - { - if ( outline && acbox ) - { - Long xMin, yMin, xMax, yMax; - - - if ( outline->n_points == 0 ) - { - xMin = 0; - yMin = 0; - xMax = 0; - yMax = 0; - } - else - { - FT_Vector* vec = outline->points; - FT_Vector* limit = vec + outline->n_points; - - - xMin = xMax = vec->x; - yMin = yMax = vec->y; - vec++; - - for ( ; vec < limit; vec++ ) - { - Long x, y; - - - x = vec->x; - if ( x < xMin ) xMin = x; - if ( x > xMax ) xMax = x; - - y = vec->y; - if ( y < yMin ) yMin = y; - if ( y > yMax ) yMax = y; - } - } - acbox->xMin = xMin; - acbox->xMax = xMax; - acbox->yMin = yMin; - acbox->yMax = yMax; - } - } - -#endif /* STANDALONE_ */ - - /************************************************************************** * * @Function: From 63d3a37eb757924f6251accb20d0d0cd33e86e7c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 23 Nov 2023 17:50:04 -0500 Subject: [PATCH 082/191] * src/raster/ftraster.c: Comments, defines, includes, cleanups. --- src/raster/ftraster.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 008d1f650..1216190ef 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -63,8 +63,7 @@ #else /* !STANDALONE_ */ #include "ftraster.h" -#include /* for FT_MulDiv and FT_MulDiv_No_Round */ -#include /* for FT_Outline_Get_CBox */ +#include /* for FT_MulDiv_No_Round */ #endif /* !STANDALONE_ */ @@ -252,7 +251,6 @@ /* On the other hand, SMulDiv means `Slow MulDiv', and is used typically */ /* for clipping computations. It simply uses the FT_MulDiv() function */ /* defined in `ftcalc.h'. */ -#define SMulDiv FT_MulDiv #define SMulDiv_No_Round FT_MulDiv_No_Round /* The rasterizer is a very general purpose component; please leave */ @@ -1910,8 +1908,9 @@ * * Advances all profile in the list to the next scanline. It also * sorts the trace list in the unlikely case of profile crossing. - * In 95%, the list is already sorted. We need an algorithm which - * is fast in this case. Bubble sort is enough and simple. + * The profiles are inserted in sorted order. We might need a single + * swap to fix it when profiles (contours) cross. + * Bubble sort with immediate restart is good enough and simple. */ static void Increment( PProfileList list ) @@ -1934,7 +1933,7 @@ *old = current->link; /* remove */ } - /* Then sort them */ + /* Then make sure the list remains sorted */ old = list; current = *old; @@ -1956,7 +1955,7 @@ current->link = next->link; next->link = current; - /* Restarting */ + /* this is likely the only necessary swap -- restart */ old = list; current = *old; } @@ -2248,7 +2247,7 @@ /* use y_turns to set the drawing range */ min_Y = (Int)ras.maxBuff[0]; - max_Y = (Int)ras.sizeBuff[-1] - 1; + max_Y = (Int)ras.maxBuff[ras.numTurns] - 1; /* now initialize the sweep */ From efbae5476f50c549004cbcf70edcf4dc8179cbf6 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 24 Nov 2023 10:23:36 -0500 Subject: [PATCH 083/191] [raster] Eliminate intensive flow checking. * src/raster/ftraster.c (Draw_Sweep): Pass the flow increment. (Increment): Accept the flow increment. --- src/raster/ftraster.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 1216190ef..7d5e9e59e 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1913,7 +1913,8 @@ * Bubble sort with immediate restart is good enough and simple. */ static void - Increment( PProfileList list ) + Increment( PProfileList list, + Int flow ) { PProfile *old, current, next; @@ -1925,7 +1926,7 @@ current = *old; if ( --current->height ) { - current->offset += ( current->flags & Flow_Up ) ? 1 : -1; + current->offset += flow; current->X = current->x[current->offset]; old = ¤t->link; } @@ -2267,6 +2268,8 @@ { *Q = P->link; /* remove */ + /* each active list contains profiles with the same flow */ + /* left and right are arbitrary, correspond to TrueType */ if ( P->flags & Flow_Up ) InsNew( &draw_left, P ); else @@ -2294,6 +2297,8 @@ Long xs; + /* TrueType should have x2 > x1, but can be opposite */ + /* by mistake or in CFF/Type1, fix it then */ if ( x1 > x2 ) { xs = x1; @@ -2418,8 +2423,8 @@ ras.Proc_Sweep_Step( RAS_VAR ); - Increment( &draw_left ); - Increment( &draw_right ); + Increment( &draw_left, 1 ); + Increment( &draw_right, -1 ); } while ( ++y < y_turn ); } From 1eb04c71ebd807156681b1fbf52514416a83dcee Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 25 Nov 2023 09:00:11 -0500 Subject: [PATCH 084/191] * docs/*: Typos. --- docs/INSTALL.ANY | 4 ++-- docs/freetype-web.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/INSTALL.ANY b/docs/INSTALL.ANY index bb77b1b9c..7cfe1feb9 100644 --- a/docs/INSTALL.ANY +++ b/docs/INSTALL.ANY @@ -72,9 +72,9 @@ I. Standard procedure -- rasterizers (optional; at least one is needed for vector formats) + src/smooth/smooth.c -- anti-aliasing rasterizer src/raster/raster.c -- monochrome rasterizer src/sdf/sdf.c -- Signed Distance Field driver - src/smooth/smooth.c -- anti-aliasing rasterizer -- auxiliary modules (optional) @@ -127,7 +127,7 @@ II. Support for flat-directory compilation 1. Copy all files in current directory cp freetype/src/base/*.[hc] . - cp freetype/src/raster1/*.[hc] . + cp freetype/src/raster/*.[hc] . cp freetype/src/smooth/*.[hc] . etc. diff --git a/docs/freetype-web.txt b/docs/freetype-web.txt index 03058fae1..0c9140c50 100644 --- a/docs/freetype-web.txt +++ b/docs/freetype-web.txt @@ -35,7 +35,7 @@ and the CI pipeline deploys the website at: Since the 'freetype.org' website uses Cloudflare caching, it will take a while for the changes to show up in 'freetype.org'. -If you have access to the Cloudflare dashbouard you can purge the +If you have access to the Cloudflare dashboard you can purge the cache from there; this will cause the cache to be fetched again resulting in the website being updated instantly. From 8f255c89e14219ca2489043f699797ee106ec6e9 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 27 Nov 2023 22:44:36 -0500 Subject: [PATCH 085/191] =?UTF-8?q?[raster]=20Speed=20up=20B=C3=A9zier=20a?= =?UTF-8?q?rches=20with=20extrema.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While it is recommended to have an explicit point at each curve extrema, they might be missing or outline could be rotated. This leads to excessive bisections in raster to find them. This change helps to decrease the number of bisections. The scanline intersections remain monotonous, of course. * src/raster/ftraster.c (Conic_To, Cubic_To): Check that control points cross the scanlines to bisect. --- src/raster/ftraster.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 7d5e9e59e..043d2faf0 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1342,7 +1342,7 @@ ymax = y1; } - if ( y2 < ymin || y2 > ymax ) + if ( y2 < FLOOR( ymin ) || y2 > CEILING( ymax ) ) { /* this arc has no given direction, split it! */ Split_Conic( arc ); @@ -1350,7 +1350,8 @@ } else if ( y1 == y3 ) { - /* this arc is flat, ignore it and pop it from the Bezier stack */ + /* this arc is flat, advance position */ + /* and pop it from the Bezier stack */ arc -= 2; ras.lastX = x3; @@ -1488,7 +1489,7 @@ ymax2 = y2; } - if ( ymin2 < ymin1 || ymax2 > ymax1 ) + if ( ymin2 < FLOOR( ymin1 ) || ymax2 > CEILING( ymax1 ) ) { /* this arc has no given direction, split it! */ Split_Cubic( arc ); @@ -1496,7 +1497,8 @@ } else if ( y1 == y4 ) { - /* this arc is flat, ignore it and pop it from the Bezier stack */ + /* this arc is flat, advance position */ + /* and pop it from the Bezier stack */ arc -= 3; ras.lastX = x4; From 5999d47d682a88d4b682d57fb00699b2d044d94b Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 1 Dec 2023 20:50:16 -0500 Subject: [PATCH 086/191] * src/raster/ftmisc.h (FT_MulDiv): Remove unused copy. --- src/raster/ftmisc.h | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h index 33dbfd631..c239710e6 100644 --- a/src/raster/ftmisc.h +++ b/src/raster/ftmisc.h @@ -92,27 +92,6 @@ #endif - static FT_Long - FT_MulDiv( FT_Long a, - FT_Long b, - FT_Long c ) - { - FT_Int s; - FT_Long d; - - - s = 1; - if ( a < 0 ) { a = -a; s = -1; } - if ( b < 0 ) { b = -b; s = -s; } - if ( c < 0 ) { c = -c; s = -s; } - - d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c - : 0x7FFFFFFFL ); - - return ( s > 0 ) ? d : -d; - } - - static FT_Long FT_MulDiv_No_Round( FT_Long a, FT_Long b, From 01f23c39e01d2c739fd8abc69aff9dbf13b46202 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 1 Dec 2023 23:13:28 -0500 Subject: [PATCH 087/191] * src/raster/ftraster.c (Draw_Sweep): Swap stub conditions. --- src/raster/ftraster.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 043d2faf0..9410c40ac 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2365,16 +2365,16 @@ if ( dropOutControl & 1 ) { - /* rightmost stub test */ - if ( P_Left->next == P_Right && - P_Left->height == 1 && + /* upper stub test */ + if ( P_Left->height == 1 && + P_Left->next == P_Right && !( P_Left->flags & Overshoot_Top && x2 - x1 >= ras.precision_half ) ) goto Next_Pair; - /* leftmost stub test */ - if ( P_Right->next == P_Left && - P_Left->offset == 0 && + /* lower stub test */ + if ( P_Left->offset == 0 && + P_Right->next == P_Left && !( P_Left->flags & Overshoot_Bottom && x2 - x1 >= ras.precision_half ) ) goto Next_Pair; From 50740b37ba5f468316edf6cf6ee97b61f2c7addd Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 6 Dec 2023 23:33:32 -0500 Subject: [PATCH 088/191] [msbuild] Streamline the process. MSBuild.exe can now be fired from the root folder without options. * builds/windows/vc2010/freetype.sln: Relocated to... * MSBuild.sln: ... here with minor changes. * MSBuild.rsp: New file with command line options. * docs/INSTALL: Reference `MSBuild.sln`. --- MSBuild.rsp | 2 ++ .../windows/vc2010/freetype.sln => MSBuild.sln | 16 +++++++++++++++- docs/INSTALL | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 MSBuild.rsp rename builds/windows/vc2010/freetype.sln => MSBuild.sln (83%) diff --git a/MSBuild.rsp b/MSBuild.rsp new file mode 100644 index 000000000..3eba50762 --- /dev/null +++ b/MSBuild.rsp @@ -0,0 +1,2 @@ +#/p:WindowsTargetPlatformVersion=10.0.16299.0 +/p:Configuration="Release" diff --git a/builds/windows/vc2010/freetype.sln b/MSBuild.sln similarity index 83% rename from builds/windows/vc2010/freetype.sln rename to MSBuild.sln index d88d70a26..001961175 100644 --- a/builds/windows/vc2010/freetype.sln +++ b/MSBuild.sln @@ -1,6 +1,20 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}" +# +# You can build FreeType with MSBuild as follows +# +# MSBuild.exe -t:Rebuild +# -p:Configuration=Debug +# -p:Platform=x64 +# -p:UserDefines=FT_DEBUG_LOGGING +# MSBuild.sln +# +# or with different appropriate switches. The library file +# freetype.dll and/or freetype.lib should appear in the objs/ +# folder. A copy should be sent to ../freetype-demos/bin/ +# to be used with the demo programs. +# +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "builds\windows\vc2010\freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/docs/INSTALL b/docs/INSTALL index 49ab112e4..1795ca3c2 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -59,7 +59,7 @@ II. Normal installation and upgrades CMake :: see `CMakeLists.txt` for more information Meson :: see `meson.build` for more information - MSBuild :: see `builds/windows/vc2010/freetype.vcxproj` + MSBuild :: see `MSBuild.sln` for more information MMS :: see `vms_make.com` and `docs/INSTALL.VMS` From 9bf72966ed75353442df205e82b7080fb8a7bb47 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 14 Dec 2023 06:11:43 +0100 Subject: [PATCH 089/191] * src/truetype/ttgxvar.c (ft_var_to_normalized): Fix undefined left-shift. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63723 --- src/truetype/ttgxvar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index ad4f266b2..78b80782a 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -2141,7 +2141,8 @@ outerIndex, innerIndex ); - v += delta << 2; + /* Convert to 16.16 format before adding. */ + v += delta * 4; /* Clamp value range. */ v = v >= 0x10000L ? 0x10000 : v; From af6d210537758e42f3d9d4c9b8689ee76b8c00c6 Mon Sep 17 00:00:00 2001 From: Jouk Jansen Date: Thu, 14 Dec 2023 06:21:52 +0100 Subject: [PATCH 090/191] * vms_make.com: Switch to `clang`. Also add proper bzip2 support. --- vms_make.com | 203 ++++++++++++++++++++++++--------------------------- 1 file changed, 96 insertions(+), 107 deletions(-) diff --git a/vms_make.com b/vms_make.com index 2c85a016a..3e2dca487 100644 --- a/vms_make.com +++ b/vms_make.com @@ -55,7 +55,7 @@ $! Setup variables holding "config" information $! $ Make = "" $ ccopt = "/name=(as_is,short)/float=ieee" -$ if ( x86_64 ) then cxxopt = "/name=(as_is,short)" +$ if ( x86_64 ) then cxxopt = " -names2=shortened " $ lopts = "" $ dnsrl = "" $ aconf_in_file = "config.hin" @@ -108,10 +108,15 @@ $ if ( have_bz2 ) then libdefs=libdefs+",FT_CONFIG_OPTION_USE_BZIP2=1" $ if ( have_png ) then libdefs=libdefs+",FT_CONFIG_OPTION_USE_PNG=1" $ if ( have_z ) then libdefs=libdefs+",FT_CONFIG_OPTION_SYSTEM_ZLIB=1" $ if ( have_harfbuzz ) then libdefs=libdefs+",FT_CONFIG_OPTION_USE_HARFBUZZ=1" +$ libdefs_cxx = "-DFT2_BUILD_LIBRARY -DFT_CONFIG_OPTION_OLD_INTERNALS" +$ if ( have_bz2 ) then libdefs_cxx=libdefs_cxx+" -DFT_CONFIG_OPTION_USE_BZIP2=1" +$ if ( have_png ) then libdefs_cxx=libdefs_cxx+" -DFT_CONFIG_OPTION_USE_PNG=1" +$ if ( have_z ) then libdefs_cxx=libdefs_cxx+" -DFT_CONFIG_OPTION_SYSTEM_ZLIB=1" +$ if ( have_harfbuzz ) then libdefs_cxx=libdefs_cxx+" -DFT_CONFIG_OPTION_USE_HARFBUZZ=1" $ if libdefs .nes. "" $ then $ ccopt = ccopt + "/define=(" + libdefs + ")" -$ if ( x86_64 ) then cxxopt = cxxopt + "/define=(" + libdefs + ")" +$ if ( x86_64 ) then cxxopt = cxxopt + libdefs_cxx $ endif $! $ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - @@ -313,18 +318,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -376,18 +381,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.autofit]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] -Isys$library .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map nl: exclude hb_ - cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64\ - /obj=$(MMS$TARGET_NAME)_64.obj $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -438,18 +443,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64\ - /obj=$(MMS$TARGET_NAME)_64.obj $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -550,18 +555,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bdf]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base]) .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -612,18 +617,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cache])/nowarn .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -677,18 +682,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cff]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -739,18 +744,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cid]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -801,18 +806,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.gxvalid]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -859,26 +864,21 @@ $ deck # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. -$EOD -$ write out "COMP_FLAGS = ", ccopt -$ if x86_64 then write out "CXXFLAGS = ", cxxopt -$ copy sys$input: out -$ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.gzip]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -927,26 +927,21 @@ $ deck # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. -$EOD -$ write out "COMP_FLAGS = ", ccopt -$ if x86_64 then write out "CXXFLAGS = ", cxxopt -$ copy sys$input: out -$ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bzip2]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] -Isys$library .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -993,26 +988,21 @@ $ deck # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. -$EOD -$ write out "COMP_FLAGS = ", ccopt -$ if x86_64 then write out "CXXFLAGS = ", cxxopt -$ copy sys$input: out -$ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.lzw]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1063,18 +1053,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otvalid]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1137,18 +1127,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pcf]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1199,18 +1189,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pfr]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1261,18 +1251,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psaux]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1323,18 +1313,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1385,18 +1375,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1447,18 +1437,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.raster]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1509,18 +1499,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.sfnt]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] -Isys$library .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1571,18 +1561,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.smooth]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I [] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1633,18 +1623,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.svg]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1695,18 +1685,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.truetype]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1757,18 +1747,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1821,18 +1811,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map - cc$(CFLAGS)/warn=noinfo/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ + cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1885,18 +1875,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type42]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -1947,18 +1937,18 @@ $ deck CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.winfonts]) .ifdef X86 -CXXFLAGS=$(CXXCOMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base]) +CXXFLAGS=$(CXXCOMP_FLAGS) -I[] -I[--.include] -I[--.src.base] .endif .ifdef X86 .c.obj : - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_cxx.obj $(MMS$TARGET_NAME).c cc$(CFLAGS)/warn=noinfo/point=32/list/show=all $(MMS$TARGET_NAME).c pipe link/map/full/exec=nl: $(MMS$TARGET_NAME).obj | copy sys$input nl: mc sys$library:vms_auto64 $(MMS$TARGET_NAME).map cc$(CFLAGS)/warn=(noinfo,disable=(MAYLOSEDATA3))/point=64/obj=$(MMS$TARGET_NAME)_64.obj\ $(MMS$TARGET_NAME)_64.c - cxx$(CXXFLAGS)/warn=noinfo/obj=$(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c + clang $(CXXFLAGS) -o $(MMS$TARGET_NAME)_64_cxx.obj $(MMS$TARGET_NAME)_64.c delete $(MMS$TARGET_NAME)_64.c;* .else .c.obj : @@ -2001,7 +1991,6 @@ $ cparm = f$edit(p'i',"upcase") $ if cparm .eqs. "DEBUG" $ then $ ccopt = ccopt + "/noopt/deb" -$ if x86_64 then cxxopt = cxxopt + "/noopt/deb" $ lopts = lopts + "/deb" $ endif $ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) From 6f2bf6a582eae387566a470353ed8fd6c74f4cca Mon Sep 17 00:00:00 2001 From: Skef Iterum Date: Thu, 14 Dec 2023 06:55:33 +0100 Subject: [PATCH 091/191] [psaux] Improve tracing. * src/psaux/psintrp.c (cf2_doBlend, cf2_interpT2CharString [cf2_cmdBLEND]): Show blended values. --- src/psaux/psintrp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index b9d5071ee..6b445a996 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -429,6 +429,8 @@ base = cf2_stack_count( opStack ) - numOperands; delta = base + numBlends; + FT_TRACE6(( " (" )); + for ( i = 0; i < numBlends; i++ ) { const CF2_Fixed* weight = &blend->BV[1]; @@ -443,10 +445,14 @@ cf2_stack_getReal( opStack, delta++ ) ) ); + FT_TRACE6(( "%f ", (float) sum / 65536 )); + /* store blended result */ cf2_stack_setReal( opStack, i + base, sum ); } + FT_TRACE6(( "blended)\n" )); + /* leave only `numBlends' results on stack */ cf2_stack_pop( opStack, numOperands - numBlends ); } @@ -735,7 +741,7 @@ FT_UInt numBlends; - FT_TRACE4(( " blend\n" )); + FT_TRACE4(( " blend" )); if ( !font->isCFF2 ) break; /* clear stack & ignore */ From 8eab511017a65026985523cab14aff07f1bb9746 Mon Sep 17 00:00:00 2001 From: Skef Iterum Date: Thu, 14 Dec 2023 06:59:05 +0100 Subject: [PATCH 092/191] [CFF] Extract `BlueValues` as `Fixed` rather than `Int`. This is a follow-up to commit 26a7f047, [cff] Make blend operator work with floats in private dicts. which addressed the 'party baseline' bug. However, the reporting user indicated that the default location and some other points in design space rendered OK, but other points in design space still had problems. The most obvious issue being that the x-heights of lower-case letters did not align; see https://github.com/adobe-fonts/source-serif/issues/121#issuecomment-1773794136 After some analysis we determined that this was due to an interaction between `BlueValue` rounding and the zone-based algorithm. In short, for a point to be considered in a zone it must fall within the bounds of the zone. (There is a slop factor in some cases, but only a very small one.) In the Adobe-contributed side of the code, point values are not integer-rounded, instead they're kept as (some form of) fixed. Rounding just the `BlueValues` means that points that need to be considered within a zone will fall outside of it at some points in design space. The majority of this patch changes the storage and parsing of `BlueValues` to keep them as `FT_Fixed`. No significant code changes were needed because the values are converted to `Fixed` anyway when stored in `CF_BlueRec`. No attempt was made to address problems in the older pshinter code beyond converting the values from `FT_Fixed` to `FT_Short` when copying the private dictionary. (However, as the point values are also rounded in that code, the problem is much less likely to occur, although inconsistency between rounding and truncation could cause an analogous problem.) * include/freetype/internal/cfftypes.h (CFF_PrivateRec): Use `FT_Fixed` for `blue_values`, `other_blues`, `family_blues`, and `family_other_blues`. * src/cff/cffload.c (cff_blend_doBlend): Updated. * src/cff/cffobjs.c (CFF_fixedToInt): New macro. (cff_make_private_dict): Use it. * src/cff/cffparse.h (cff_kind_delta_fixed): New enum value. * src/cff/cffparse.c (do_fixed): Updated. (CFF_FIELD_DELTA, CFF_FIELD_DELTA_FIXED, CFF_DELTA_KIND): New set of macros, replacing `CFF_FIELD_DELTA`. (cff_parser_run): Updated to handle fixed-float deltas. * src/cff/cfftoken.h: Updated to use `CFF_FIELD_DELTA_FIXED` for blue values. * src/psaux/psblues.c (cf2_blueToFixed): Removed, no longer needed. (cf2_blues_init): Updated. * src/pxaux/psft.c, src/pxaux/psft.h (cf2_getBlueValues, cf2_getOtherBlues, cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Updated signatures. * src/psaux/psobjs.c (t1_make_subfont): Updated. --- include/freetype/internal/cfftypes.h | 8 +-- src/cff/cffload.c | 8 +-- src/cff/cffobjs.c | 11 ++-- src/cff/cffparse.c | 87 ++++++++++++++++++++-------- src/cff/cffparse.h | 1 + src/cff/cfftoken.h | 72 +++++++++++------------ src/psaux/psblues.c | 48 ++++++--------- src/psaux/psft.c | 16 ++--- src/psaux/psft.h | 8 +-- src/psaux/psobjs.c | 9 +-- 10 files changed, 149 insertions(+), 119 deletions(-) diff --git a/include/freetype/internal/cfftypes.h b/include/freetype/internal/cfftypes.h index c2521764c..af9f5bc6b 100644 --- a/include/freetype/internal/cfftypes.h +++ b/include/freetype/internal/cfftypes.h @@ -248,10 +248,10 @@ FT_BEGIN_HEADER FT_Byte num_family_blues; FT_Byte num_family_other_blues; - FT_Pos blue_values[14]; - FT_Pos other_blues[10]; - FT_Pos family_blues[14]; - FT_Pos family_other_blues[10]; + FT_Fixed blue_values[14]; + FT_Fixed other_blues[10]; + FT_Fixed family_blues[14]; + FT_Fixed family_other_blues[10]; FT_Fixed blue_scale; FT_Pos blue_shift; diff --git a/src/cff/cffload.c b/src/cff/cffload.c index af79082e9..feea55fcf 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -1379,10 +1379,10 @@ /* opcode in both CFF and CFF2 DICTs. See `cff_parse_num' for */ /* decode of this, which rounds to an integer. */ *subFont->blend_top++ = 255; - *subFont->blend_top++ = (FT_Byte)( sum >> 24 ); - *subFont->blend_top++ = (FT_Byte)( sum >> 16 ); - *subFont->blend_top++ = (FT_Byte)( sum >> 8 ); - *subFont->blend_top++ = (FT_Byte)sum; + *subFont->blend_top++ = (FT_Byte)( (FT_UInt32)sum >> 24 ); + *subFont->blend_top++ = (FT_Byte)( (FT_UInt32)sum >> 16 ); + *subFont->blend_top++ = (FT_Byte)( (FT_UInt32)sum >> 8 ); + *subFont->blend_top++ = (FT_Byte)( (FT_UInt32)sum ); } /* leave only numBlends results on parser stack */ diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index 4b710745f..9169a03e2 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -42,6 +42,8 @@ #include #include +#define CFF_fixedToInt( x ) \ + ( (FT_Short)( ( (x) + 0x8000U ) >> 16 ) ) /************************************************************************** * @@ -124,19 +126,20 @@ count = priv->num_blue_values = cpriv->num_blue_values; for ( n = 0; n < count; n++ ) - priv->blue_values[n] = (FT_Short)cpriv->blue_values[n]; + priv->blue_values[n] = CFF_fixedToInt( cpriv->blue_values[n] ); count = priv->num_other_blues = cpriv->num_other_blues; for ( n = 0; n < count; n++ ) - priv->other_blues[n] = (FT_Short)cpriv->other_blues[n]; + priv->other_blues[n] = CFF_fixedToInt( cpriv->other_blues[n] ); count = priv->num_family_blues = cpriv->num_family_blues; for ( n = 0; n < count; n++ ) - priv->family_blues[n] = (FT_Short)cpriv->family_blues[n]; + priv->family_blues[n] = CFF_fixedToInt( cpriv->family_blues[n] ); count = priv->num_family_other_blues = cpriv->num_family_other_blues; for ( n = 0; n < count; n++ ) - priv->family_other_blues[n] = (FT_Short)cpriv->family_other_blues[n]; + priv->family_other_blues[n] = + CFF_fixedToInt( cpriv->family_other_blues[n] ); priv->blue_scale = cpriv->blue_scale; priv->blue_shift = (FT_Int)cpriv->blue_shift; diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c index 77992ab6f..138cd6543 100644 --- a/src/cff/cffparse.c +++ b/src/cff/cffparse.c @@ -501,10 +501,10 @@ return cff_parse_real( *d, parser->limit, scaling, NULL ); else if ( **d == 255 ) { - FT_Fixed val = ( ( ( (FT_UInt32)*( d[0] + 1 ) << 24 ) | - ( (FT_UInt32)*( d[0] + 2 ) << 16 ) | - ( (FT_UInt32)*( d[0] + 3 ) << 8 ) | - (FT_UInt32)*( d[0] + 4 ) ) ); + FT_Fixed val = (FT_Int32)( ( ( (FT_UInt32)*( d[0] + 1 ) << 24 ) | + ( (FT_UInt32)*( d[0] + 2 ) << 16 ) | + ( (FT_UInt32)*( d[0] + 3 ) << 8 ) | + (FT_UInt32)*( d[0] + 4 ) ) ); if ( scaling ) { @@ -1031,10 +1031,14 @@ CFF_FIELD( code, name, id, cff_kind_string ) #define CFF_FIELD_BOOL( code, name, id ) \ CFF_FIELD( code, name, id, cff_kind_bool ) +#define CFF_FIELD_DELTA( code, name, max, id ) \ + CFF_FIELD_DELTA_KIND( code, name, max, id, cff_kind_delta ) +#define CFF_FIELD_DELTA_FIXED( code, name, max, id ) \ + CFF_FIELD_DELTA_KIND( code, name, max, id, cff_kind_delta_fixed ) #undef CFF_FIELD -#undef CFF_FIELD_DELTA +#undef CFF_FIELD_DELTA_KIND #ifndef FT_DEBUG_LEVEL_TRACE @@ -1067,15 +1071,15 @@ NULL, 0, 0 \ }, -#define CFF_FIELD_DELTA( code, name, max, id ) \ - { \ - cff_kind_delta, \ - code | CFFCODE, \ - FT_FIELD_OFFSET( name ), \ - FT_FIELD_SIZE_DELTA( name ), \ - NULL, \ - max, \ - FT_FIELD_OFFSET( num_ ## name ) \ +#define CFF_FIELD_DELTA_KIND( code, name, max, id, kind ) \ + { \ + kind, \ + code | CFFCODE, \ + FT_FIELD_OFFSET( name ), \ + FT_FIELD_SIZE_DELTA( name ), \ + NULL, \ + max, \ + FT_FIELD_OFFSET( num_ ## name ) \ }, static const CFF_Field_Handler cff_field_handlers[] = @@ -1121,16 +1125,16 @@ id \ }, -#define CFF_FIELD_DELTA( code, name, max, id ) \ - { \ - cff_kind_delta, \ - code | CFFCODE, \ - FT_FIELD_OFFSET( name ), \ - FT_FIELD_SIZE_DELTA( name ), \ - NULL, \ - max, \ - FT_FIELD_OFFSET( num_ ## name ), \ - id \ +#define CFF_FIELD_DELTA_KIND( code, name, max, id, kind ) \ + { \ + kind, \ + code | CFFCODE, \ + FT_FIELD_OFFSET( name ), \ + FT_FIELD_SIZE_DELTA( name ), \ + NULL, \ + max, \ + FT_FIELD_OFFSET( num_ ## name ), \ + id \ }, static const CFF_Field_Handler cff_field_handlers[] = @@ -1356,7 +1360,8 @@ /* check that we have enough arguments -- except for */ /* delta encoded arrays, which can be empty */ - if ( field->kind != cff_kind_delta && num_args < 1 ) + if ( field->kind != cff_kind_delta && + field->kind != cff_kind_delta_fixed && num_args < 1 ) goto Stack_Underflow; switch ( field->kind ) @@ -1471,6 +1476,38 @@ } break; + case cff_kind_delta_fixed: + { + FT_Byte* qcount = (FT_Byte*)parser->object + + field->count_offset; + + FT_Byte** data = parser->stack; + + + if ( num_args > field->array_max ) + num_args = field->array_max; + + FT_TRACE4(( " [" )); + + /* store count */ + *qcount = (FT_Byte)num_args; + + val = 0; + while ( num_args > 0 ) + { + val = ADD_LONG( val, cff_parse_fixed( parser, data++ ) ); + *(FT_Long*)q = val; + + FT_TRACE4(( " %f\n", (double)val / 65536 )); + + q += field->size; + num_args--; + } + + FT_TRACE4(( "]\n" )); + } + break; + default: /* callback or blend */ error = field->reader( parser ); if ( error ) diff --git a/src/cff/cffparse.h b/src/cff/cffparse.h index 418caacc6..4c683f2f0 100644 --- a/src/cff/cffparse.h +++ b/src/cff/cffparse.h @@ -107,6 +107,7 @@ FT_BEGIN_HEADER cff_kind_string, cff_kind_bool, cff_kind_delta, + cff_kind_delta_fixed, cff_kind_callback, cff_kind_blend, diff --git a/src/cff/cfftoken.h b/src/cff/cfftoken.h index b61cb0e66..b038c7a24 100644 --- a/src/cff/cfftoken.h +++ b/src/cff/cfftoken.h @@ -80,26 +80,26 @@ #undef CFFCODE #define CFFCODE CFF_CODE_PRIVATE - CFF_FIELD_DELTA ( 6, blue_values, 14, "BlueValues" ) - CFF_FIELD_DELTA ( 7, other_blues, 10, "OtherBlues" ) - CFF_FIELD_DELTA ( 8, family_blues, 14, "FamilyBlues" ) - CFF_FIELD_DELTA ( 9, family_other_blues, 10, "FamilyOtherBlues" ) - CFF_FIELD_FIXED_1000( 0x109, blue_scale, "BlueScale" ) - CFF_FIELD_NUM ( 0x10A, blue_shift, "BlueShift" ) - CFF_FIELD_NUM ( 0x10B, blue_fuzz, "BlueFuzz" ) - CFF_FIELD_NUM ( 10, standard_width, "StdHW" ) - CFF_FIELD_NUM ( 11, standard_height, "StdVW" ) - CFF_FIELD_DELTA ( 0x10C, snap_widths, 13, "StemSnapH" ) - CFF_FIELD_DELTA ( 0x10D, snap_heights, 13, "StemSnapV" ) - CFF_FIELD_BOOL ( 0x10E, force_bold, "ForceBold" ) - CFF_FIELD_FIXED ( 0x10F, force_bold_threshold, "ForceBoldThreshold" ) - CFF_FIELD_NUM ( 0x110, lenIV, "lenIV" ) - CFF_FIELD_NUM ( 0x111, language_group, "LanguageGroup" ) - CFF_FIELD_FIXED ( 0x112, expansion_factor, "ExpansionFactor" ) - CFF_FIELD_NUM ( 0x113, initial_random_seed, "initialRandomSeed" ) - CFF_FIELD_NUM ( 19, local_subrs_offset, "Subrs" ) - CFF_FIELD_NUM ( 20, default_width, "defaultWidthX" ) - CFF_FIELD_NUM ( 21, nominal_width, "nominalWidthX" ) + CFF_FIELD_DELTA_FIXED( 6, blue_values, 14, "BlueValues" ) + CFF_FIELD_DELTA_FIXED( 7, other_blues, 10, "OtherBlues" ) + CFF_FIELD_DELTA_FIXED( 8, family_blues, 14, "FamilyBlues" ) + CFF_FIELD_DELTA_FIXED( 9, family_other_blues, 10, "FamilyOtherBlues" ) + CFF_FIELD_FIXED_1000 ( 0x109, blue_scale, "BlueScale" ) + CFF_FIELD_NUM ( 0x10A, blue_shift, "BlueShift" ) + CFF_FIELD_NUM ( 0x10B, blue_fuzz, "BlueFuzz" ) + CFF_FIELD_NUM ( 10, standard_width, "StdHW" ) + CFF_FIELD_NUM ( 11, standard_height, "StdVW" ) + CFF_FIELD_DELTA ( 0x10C, snap_widths, 13, "StemSnapH" ) + CFF_FIELD_DELTA ( 0x10D, snap_heights, 13, "StemSnapV" ) + CFF_FIELD_BOOL ( 0x10E, force_bold, "ForceBold" ) + CFF_FIELD_FIXED ( 0x10F, force_bold_threshold, "ForceBoldThreshold" ) + CFF_FIELD_NUM ( 0x110, lenIV, "lenIV" ) + CFF_FIELD_NUM ( 0x111, language_group, "LanguageGroup" ) + CFF_FIELD_FIXED ( 0x112, expansion_factor, "ExpansionFactor" ) + CFF_FIELD_NUM ( 0x113, initial_random_seed, "initialRandomSeed" ) + CFF_FIELD_NUM ( 19, local_subrs_offset, "Subrs" ) + CFF_FIELD_NUM ( 20, default_width, "defaultWidthX" ) + CFF_FIELD_NUM ( 21, nominal_width, "nominalWidthX" ) #undef FT_STRUCTURE @@ -129,22 +129,22 @@ #undef CFFCODE #define CFFCODE CFF2_CODE_PRIVATE - CFF_FIELD_DELTA ( 6, blue_values, 14, "BlueValues" ) - CFF_FIELD_DELTA ( 7, other_blues, 10, "OtherBlues" ) - CFF_FIELD_DELTA ( 8, family_blues, 14, "FamilyBlues" ) - CFF_FIELD_DELTA ( 9, family_other_blues, 10, "FamilyOtherBlues" ) - CFF_FIELD_FIXED_1000( 0x109, blue_scale, "BlueScale" ) - CFF_FIELD_NUM ( 0x10A, blue_shift, "BlueShift" ) - CFF_FIELD_NUM ( 0x10B, blue_fuzz, "BlueFuzz" ) - CFF_FIELD_NUM ( 10, standard_width, "StdHW" ) - CFF_FIELD_NUM ( 11, standard_height, "StdVW" ) - CFF_FIELD_DELTA ( 0x10C, snap_widths, 13, "StemSnapH" ) - CFF_FIELD_DELTA ( 0x10D, snap_heights, 13, "StemSnapV" ) - CFF_FIELD_NUM ( 0x111, language_group, "LanguageGroup" ) - CFF_FIELD_FIXED ( 0x112, expansion_factor, "ExpansionFactor" ) - CFF_FIELD_CALLBACK ( 22, vsindex, "vsindex" ) - CFF_FIELD_BLEND ( 23, "blend" ) - CFF_FIELD_NUM ( 19, local_subrs_offset, "Subrs" ) + CFF_FIELD_DELTA_FIXED( 6, blue_values, 14, "BlueValues" ) + CFF_FIELD_DELTA_FIXED( 7, other_blues, 10, "OtherBlues" ) + CFF_FIELD_DELTA_FIXED( 8, family_blues, 14, "FamilyBlues" ) + CFF_FIELD_DELTA_FIXED( 9, family_other_blues, 10, "FamilyOtherBlues" ) + CFF_FIELD_FIXED_1000 ( 0x109, blue_scale, "BlueScale" ) + CFF_FIELD_NUM ( 0x10A, blue_shift, "BlueShift" ) + CFF_FIELD_NUM ( 0x10B, blue_fuzz, "BlueFuzz" ) + CFF_FIELD_NUM ( 10, standard_width, "StdHW" ) + CFF_FIELD_NUM ( 11, standard_height, "StdVW" ) + CFF_FIELD_DELTA ( 0x10C, snap_widths, 13, "StemSnapH" ) + CFF_FIELD_DELTA ( 0x10D, snap_heights, 13, "StemSnapV" ) + CFF_FIELD_NUM ( 0x111, language_group, "LanguageGroup" ) + CFF_FIELD_FIXED ( 0x112, expansion_factor, "ExpansionFactor" ) + CFF_FIELD_CALLBACK ( 22, vsindex, "vsindex" ) + CFF_FIELD_BLEND ( 23, "blend" ) + CFF_FIELD_NUM ( 19, local_subrs_offset, "Subrs" ) /* END */ diff --git a/src/psaux/psblues.c b/src/psaux/psblues.c index f9c864fea..213b943b4 100644 --- a/src/psaux/psblues.c +++ b/src/psaux/psblues.c @@ -54,14 +54,6 @@ #define FT_COMPONENT cf2blues - /* - * For blue values, the FreeType parser produces an array of integers, - * while the Adobe CFF engine produces an array of fixed. - * Define a macro to convert FreeType to fixed. - */ -#define cf2_blueToFixed( x ) cf2_intToFixed( x ) - - FT_LOCAL_DEF( void ) cf2_blues_init( CF2_Blues blues, CF2_Font font ) @@ -78,10 +70,10 @@ size_t numFamilyBlues; size_t numFamilyOtherBlues; - FT_Pos* blueValues; - FT_Pos* otherBlues; - FT_Pos* familyBlues; - FT_Pos* familyOtherBlues; + FT_Fixed* blueValues; + FT_Fixed* otherBlues; + FT_Fixed* familyBlues; + FT_Fixed* familyOtherBlues; size_t i; CF2_Fixed emBoxBottom, emBoxTop; @@ -138,13 +130,13 @@ emBoxTop = CF2_ICF_Top; } - if ( cf2_getLanguageGroup( decoder ) == 1 && - ( numBlueValues == 0 || - ( numBlueValues == 4 && - cf2_blueToFixed( blueValues[0] ) < emBoxBottom && - cf2_blueToFixed( blueValues[1] ) < emBoxBottom && - cf2_blueToFixed( blueValues[2] ) > emBoxTop && - cf2_blueToFixed( blueValues[3] ) > emBoxTop ) ) ) + if ( cf2_getLanguageGroup( decoder ) == 1 && + ( numBlueValues == 0 || + ( numBlueValues == 4 && + blueValues[0] < emBoxBottom && + blueValues[1] < emBoxBottom && + blueValues[2] > emBoxTop && + blueValues[3] > emBoxTop ) ) ) { /* * Construct hint edges suitable for synthetic ghost hints at top @@ -189,10 +181,8 @@ /* bottom zones */ for ( i = 0; i < numBlueValues; i += 2 ) { - blues->zone[blues->count].csBottomEdge = - cf2_blueToFixed( blueValues[i] ); - blues->zone[blues->count].csTopEdge = - cf2_blueToFixed( blueValues[i + 1] ); + blues->zone[blues->count].csBottomEdge = blueValues[i]; + blues->zone[blues->count].csTopEdge = blueValues[i + 1]; zoneHeight = SUB_INT32( blues->zone[blues->count].csTopEdge, blues->zone[blues->count].csBottomEdge ); @@ -238,10 +228,8 @@ for ( i = 0; i < numOtherBlues; i += 2 ) { - blues->zone[blues->count].csBottomEdge = - cf2_blueToFixed( otherBlues[i] ); - blues->zone[blues->count].csTopEdge = - cf2_blueToFixed( otherBlues[i + 1] ); + blues->zone[blues->count].csBottomEdge = otherBlues[i]; + blues->zone[blues->count].csTopEdge = otherBlues[i + 1]; zoneHeight = SUB_INT32( blues->zone[blues->count].csTopEdge, blues->zone[blues->count].csBottomEdge ); @@ -299,7 +287,7 @@ for ( j = 0; j < numFamilyOtherBlues; j += 2 ) { /* top edge */ - flatFamilyEdge = cf2_blueToFixed( familyOtherBlues[j + 1] ); + flatFamilyEdge = familyOtherBlues[j + 1]; diff = cf2_fixedAbs( SUB_INT32( flatEdge, flatFamilyEdge ) ); @@ -317,7 +305,7 @@ if ( numFamilyBlues >= 2 ) { /* top edge */ - flatFamilyEdge = cf2_blueToFixed( familyBlues[1] ); + flatFamilyEdge = familyBlues[1]; diff = cf2_fixedAbs( SUB_INT32( flatEdge, flatFamilyEdge ) ); @@ -337,7 +325,7 @@ for ( j = 2; j < numFamilyBlues; j += 2 ) { /* bottom edge */ - flatFamilyEdge = cf2_blueToFixed( familyBlues[j] ); + flatFamilyEdge = familyBlues[j]; /* adjust edges of top zone upward by twice darkening amount */ flatFamilyEdge += 2 * font->darkenY; /* bottom edge */ diff --git a/src/psaux/psft.c b/src/psaux/psft.c index 618864e6e..fd0abe171 100644 --- a/src/psaux/psft.c +++ b/src/psaux/psft.c @@ -566,12 +566,12 @@ FT_LOCAL_DEF( void ) cf2_getBlueValues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ) + FT_Fixed* *data ) { FT_ASSERT( decoder && decoder->current_subfont ); *count = decoder->current_subfont->private_dict.num_blue_values; - *data = (FT_Pos*) + *data = (FT_Fixed*) &decoder->current_subfont->private_dict.blue_values; } @@ -579,12 +579,12 @@ FT_LOCAL_DEF( void ) cf2_getOtherBlues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ) + FT_Fixed* *data ) { FT_ASSERT( decoder && decoder->current_subfont ); *count = decoder->current_subfont->private_dict.num_other_blues; - *data = (FT_Pos*) + *data = (FT_Fixed*) &decoder->current_subfont->private_dict.other_blues; } @@ -592,12 +592,12 @@ FT_LOCAL_DEF( void ) cf2_getFamilyBlues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ) + FT_Fixed* *data ) { FT_ASSERT( decoder && decoder->current_subfont ); *count = decoder->current_subfont->private_dict.num_family_blues; - *data = (FT_Pos*) + *data = (FT_Fixed*) &decoder->current_subfont->private_dict.family_blues; } @@ -605,12 +605,12 @@ FT_LOCAL_DEF( void ) cf2_getFamilyOtherBlues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ) + FT_Fixed* *data ) { FT_ASSERT( decoder && decoder->current_subfont ); *count = decoder->current_subfont->private_dict.num_family_other_blues; - *data = (FT_Pos*) + *data = (FT_Fixed*) &decoder->current_subfont->private_dict.family_other_blues; } diff --git a/src/psaux/psft.h b/src/psaux/psft.h index 3da454e60..d9082f3a2 100644 --- a/src/psaux/psft.h +++ b/src/psaux/psft.h @@ -92,19 +92,19 @@ FT_BEGIN_HEADER FT_LOCAL( void ) cf2_getBlueValues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ); + FT_Fixed* *data ); FT_LOCAL( void ) cf2_getOtherBlues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ); + FT_Fixed* *data ); FT_LOCAL( void ) cf2_getFamilyBlues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ); + FT_Fixed* *data ); FT_LOCAL( void ) cf2_getFamilyOtherBlues( PS_Decoder* decoder, size_t* count, - FT_Pos* *data ); + FT_Fixed* *data ); FT_LOCAL( CF2_Int ) cf2_getLanguageGroup( PS_Decoder* decoder ); diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index 8da755d0e..a70a8b1d7 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -2463,19 +2463,20 @@ count = cpriv->num_blue_values = priv->num_blue_values; for ( n = 0; n < count; n++ ) - cpriv->blue_values[n] = (FT_Pos)priv->blue_values[n]; + cpriv->blue_values[n] = cf2_intToFixed( priv->blue_values[n] ); count = cpriv->num_other_blues = priv->num_other_blues; for ( n = 0; n < count; n++ ) - cpriv->other_blues[n] = (FT_Pos)priv->other_blues[n]; + cpriv->other_blues[n] = cf2_intToFixed( priv->other_blues[n] ); count = cpriv->num_family_blues = priv->num_family_blues; for ( n = 0; n < count; n++ ) - cpriv->family_blues[n] = (FT_Pos)priv->family_blues[n]; + cpriv->family_blues[n] = cf2_intToFixed( priv->family_blues[n] ); count = cpriv->num_family_other_blues = priv->num_family_other_blues; for ( n = 0; n < count; n++ ) - cpriv->family_other_blues[n] = (FT_Pos)priv->family_other_blues[n]; + cpriv->family_other_blues[n] = + cf2_intToFixed( priv->family_other_blues[n] ); cpriv->blue_scale = priv->blue_scale; cpriv->blue_shift = (FT_Pos)priv->blue_shift; From ca76683b781db5d06ef1a0e2cb62a767e7dbe626 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 18 Dec 2023 17:45:05 +0000 Subject: [PATCH 093/191] [ci] Add support for MSBuild on Windows. This adds msbuild job for VS2019 (x64). * .gitlab-ci.yml: Added "windows msbuild vs2019 amd64". --- .gitlab-ci.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb078e244..2095646dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,9 +74,24 @@ variables: meson compile --verbose -C build $env:MESON_WINDOWS_TESTS" +.build windows msbuild: + extends: '.build windows common' + variables: + # Make sure any failure in PowerShell scripts is fatal. + ErrorActionPreference: 'Stop' + WarningPreference: 'Stop' + script: + - git submodule update --init --recursive + - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && + MSBuild.exe -clp:ForceConsoleColor -t:Rebuild + -p:Configuration=Debug + -p:Platform=$env:PLATFORM + -p:UserDefines=FT_DEBUG_LOGGING + MSBuild.sln" + # Format of job names: -# +# : # Windows jobs. @@ -100,6 +115,13 @@ windows meson vs2019 amd64 uwp: VS_UWP: '-app_platform=UWP' MESON_ARGS_UWP: '--cross-file uwp-crossfile.meson -Dc_winlibs="windowsapp.lib"' +windows msbuild vs2019 amd64: + extends: '.build windows msbuild' + variables: + ARCH: 'amd64' + PLATFORM: 'x64' + + # Linux Jobs. # # Jobs with "libs" in the name force-enable libraries. From 57c4252ab5f435c52e66b619bd514068f7a683b0 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 2 Jan 2024 17:55:33 +0100 Subject: [PATCH 094/191] [sfnt] Guard access in 'COLR' v1 glyph binary search. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1505216 * src/sfnt/ttcolr.c (find_base_glyph_v1_record): Guard access of the search pointer during binary search. The pointer needs to be checked as we go as the test that compares number of v1 glyphs with table size at the time of loading the table is not sufficient on its own. A scenario is possible in which the `BaseGlyphRecord` list extends into non-`BaseGlyphRecord` parts of the 'COLR' v1 table (but passed the size comparison check). Then, at those locations, invalid glyph ID values are read and may provoke an invalid read due to reassigning min and max values during the binary search. --- src/sfnt/ttcolr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c index 281e7135e..0601d2661 100644 --- a/src/sfnt/ttcolr.c +++ b/src/sfnt/ttcolr.c @@ -1269,6 +1269,7 @@ static FT_Bool find_base_glyph_v1_record( FT_Byte * base_glyph_begin, FT_UInt num_base_glyph, + FT_Byte * end_colr, FT_UInt glyph_id, BaseGlyphV1Record *record ) { @@ -1287,6 +1288,14 @@ */ FT_Byte *p = base_glyph_begin + 4 + mid * BASE_GLYPH_PAINT_RECORD_SIZE; + + /* We need to be able to read 2 bytes (FT_NEXT_USHORT) for the glyph */ + /* ID, then 4 bytes (FT_NEXT_ULONG) for the paint offset. If that's */ + /* not available before the end of the table, something's wrong with */ + /* the font and we can't find a COLRv1 glyph. */ + if ( p > end_colr - 2 - 4 ) + return 0; + FT_UShort gid = FT_NEXT_USHORT( p ); @@ -1328,6 +1337,7 @@ if ( !find_base_glyph_v1_record( colr->base_glyphs_v1, colr->num_base_glyphs_v1, + (FT_Byte*)colr->table + colr->table_size, base_glyph, &base_glyph_v1_record ) ) return 0; From a07ca46cd0fcb4af99ae831dee803d3bddf01dd6 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 3 Jan 2024 14:55:33 +0000 Subject: [PATCH 095/191] * .gitlab-ci.yml: Use detached CI pipelines. See issue freedesktop/freedesktop#540. --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2095646dd..faa0cd48a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,11 @@ # CI setup for FreeType. +# https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540 +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + stages: - build From 4a85ff0b79ebb6a3e70c3b82cb63ffe4a0d4ccf0 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 4 Jan 2024 21:38:51 -0500 Subject: [PATCH 096/191] [sfnt] Restrict POST version 1.0. A font has surfaced with `post` version 1.0 and fewer than 258 glyphs. Its glyphs did not correspond to their names. We now reject such `post` strictly following specifications. * src/sfnt/ttpost.c (tt_face_get_ps_name): Check the number of glyphs for version 1.0. --- src/sfnt/ttpost.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index f2aeae233..dcde7def8 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -436,13 +436,8 @@ format = face->postscript.FormatType; - if ( format == 0x00010000L ) - { - if ( idx < 258 ) /* paranoid checking */ - *PSname = MAC_NAME( idx ); - } - else if ( format == 0x00020000L || - format == 0x00025000L ) + if ( format == 0x00020000L || + format == 0x00025000L ) { TT_Post_Names names = &face->postscript_names; @@ -466,6 +461,11 @@ } } + /* version 1.0 is only valid with 258 glyphs */ + else if ( format == 0x00010000L && + face->max_profile.numGlyphs == 258 ) + *PSname = MAC_NAME( idx ); + /* nothing to do for format == 0x00030000L */ End: From cc081d7cce78cae1a734e24cb8c245a618d5f3b2 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 6 Jan 2024 19:22:36 -0500 Subject: [PATCH 097/191] [base] Fix up Mac resource forks and dfonts. * src/base/ftobjs.c (IsMacResource): Assign `face_index`. * src/base/ftmac.c (FT_New_Face_From_Suitcase): Ditto after rework. --- src/base/ftmac.c | 19 ++++++++++++++----- src/base/ftobjs.c | 5 ++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/base/ftmac.c b/src/base/ftmac.c index 492d05538..cc54391b7 100644 --- a/src/base/ftmac.c +++ b/src/base/ftmac.c @@ -812,6 +812,7 @@ ResourceIndex res_index; Handle fond; short num_faces_in_res; + FT_Long count; if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) ) @@ -821,8 +822,10 @@ if ( ResError() ) return FT_THROW( Cannot_Open_Resource ); + res_index = 1; num_faces_in_res = 0; - for ( res_index = 1; ; res_index++ ) + count = face_index; + while ( count >= 0 ) { short num_faces_in_fond; @@ -834,15 +837,21 @@ num_faces_in_fond = count_faces( fond, pathname ); num_faces_in_res += num_faces_in_fond; - if ( 0 <= face_index && face_index < num_faces_in_fond && error ) - error = FT_New_Face_From_FOND( library, fond, face_index, aface ); + if ( count < num_faces_in_fond ) + error = FT_New_Face_From_FOND( library, fond, count, aface ); - face_index -= num_faces_in_fond; + res_index++; + count -= num_faces_in_fond; } CloseResFile( res_ref ); + if ( !error && aface && *aface ) - (*aface)->num_faces = num_faces_in_res; + { + (*aface)->num_faces = num_faces_in_res; + (*aface)->face_index = face_index; + } + return error; } diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 759b95c73..71a976c26 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2302,7 +2302,10 @@ face_index_internal, aface ); FT_FREE( data_offsets ); if ( !error ) - (*aface)->num_faces = count; + { + (*aface)->num_faces = count; + (*aface)->face_index = face_index_internal; + } } return error; From 7bac4d146a86482c154bf878221ff321faccac4c Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 8 Jan 2024 20:25:31 +0100 Subject: [PATCH 098/191] * src/sfnt/ttcolr.c (find_base_glyph_v1_record): Fix build in C90 mode. --- src/sfnt/ttcolr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c index 0601d2661..7f8bf74b2 100644 --- a/src/sfnt/ttcolr.c +++ b/src/sfnt/ttcolr.c @@ -1279,7 +1279,8 @@ while ( min < max ) { - FT_UInt mid = min + ( max - min ) / 2; + FT_UInt mid = min + ( max - min ) / 2; + FT_UShort gid; /* * `base_glyph_begin` is the beginning of `BaseGlyphV1List`; @@ -1296,8 +1297,7 @@ if ( p > end_colr - 2 - 4 ) return 0; - FT_UShort gid = FT_NEXT_USHORT( p ); - + gid = FT_NEXT_USHORT( p ); if ( gid < glyph_id ) min = mid + 1; From 6d9147263b88781d615689f0c9d4078de956f849 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 13 Jan 2024 22:28:54 -0500 Subject: [PATCH 099/191] * CMakeLists.txt: Accommodate MingGW. See https://github.com/StephanTLavavej/mingw-distro/issues/97. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dbca01e6..cbee5b388 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,7 +297,7 @@ if (NOT FT_DISABLE_BROTLI) endif () # Create the configuration file -if (UNIX) +if (UNIX AND NOT WIN32) check_include_file("unistd.h" HAVE_UNISTD_H) check_include_file("fcntl.h" HAVE_FCNTL_H) @@ -423,10 +423,10 @@ set(BASE_SRCS src/winfonts/winfnt.c ) -if (UNIX) - list(APPEND BASE_SRCS "builds/unix/ftsystem.c") -elseif (WIN32) +if (WIN32) list(APPEND BASE_SRCS "builds/windows/ftsystem.c") +elseif (UNIX) + list(APPEND BASE_SRCS "builds/unix/ftsystem.c") else () list(APPEND BASE_SRCS "src/base/ftsystem.c") endif () From 57617782464411201ce7bbc93b086c1b4d7d84a5 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 14 Jan 2024 13:03:51 +0000 Subject: [PATCH 100/191] [smooth] Remove SSE2. As a result of 7b308a29dd10, the regular 64-bit execution is now faster than SSE2. The rendering speed of script fonts at 64 ppem or larger is improved by about 3% without SSE2. See !314 for the testing results. * src/smooth/ftgrays.c (gray_render_conic)[FT_INT64]: Remove SSE2 code. --- src/smooth/ftgrays.c | 104 +++---------------------------------------- 1 file changed, 6 insertions(+), 98 deletions(-) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 4574da8bc..79b864c1f 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -997,49 +997,12 @@ typedef ptrdiff_t FT_PtrDist; #endif /* - * Benchmarking shows that using DDA to flatten the quadratic Bézier arcs - * is slightly faster in the following cases: - * - * - When the host CPU is 64-bit. - * - When SSE2 SIMD registers and instructions are available (even on - * x86). - * - * For other cases, using binary splits is actually slightly faster. - */ -#if ( defined( __SSE2__ ) || \ - defined( __x86_64__ ) || \ - defined( _M_AMD64 ) || \ - ( defined( _M_IX86_FP ) && _M_IX86_FP >= 2 ) ) && \ - !defined( __VMS ) -# define FT_SSE2 1 -#else -# define FT_SSE2 0 -#endif - -#if FT_SSE2 || \ - defined( __aarch64__ ) || \ - defined( _M_ARM64 ) -# define BEZIER_USE_DDA 1 -#else -# define BEZIER_USE_DDA 0 -#endif - - /* - * For now, the code that depends on `BEZIER_USE_DDA` requires `FT_Int64` - * to be defined. If `FT_INT64` is not defined, meaning there is no - * 64-bit type available, disable it to avoid compilation errors. See for - * example https://gitlab.freedesktop.org/freetype/freetype/-/issues/1071. + * For now, the code that uses DDA to render conic curves requires + * `FT_Int64` to be defined. See for example + * https://gitlab.freedesktop.org/freetype/freetype/-/issues/1071. */ -#if !defined( FT_INT64 ) -# undef BEZIER_USE_DDA -# define BEZIER_USE_DDA 0 -#endif -#if BEZIER_USE_DDA - -#if FT_SSE2 -# include -#endif +#ifdef FT_INT64 #define LEFT_SHIFT( a, b ) (FT_Int64)( (FT_UInt64)(a) << (b) ) @@ -1151,61 +1114,6 @@ typedef ptrdiff_t FT_PtrDist; * = (B << (33 - N)) + (A << (32 - 2*N)) */ -#if FT_SSE2 - /* Experience shows that for small counts, SSE2 is actually slower. */ - if ( count > 4 ) - { - union - { - struct { FT_Int64 ax, ay, bx, by; } i; - struct { __m128i a, b; } vec; - - } u; - - union - { - struct { FT_Int32 px_lo, px_hi, py_lo, py_hi; } i; - __m128i vec; - - } v; - - __m128i p, q, r; - - - u.i.ax = ax; - u.i.ay = ay; - u.i.bx = bx; - u.i.by = by; - - q = _mm_load_si128( &u.vec.b ); - r = _mm_load_si128( &u.vec.a ); - - q = _mm_slli_epi64( q, shift + 17); - r = _mm_slli_epi64( r, shift + shift ); - q = _mm_add_epi64( q, r ); - r = _mm_add_epi64( r, r ); - - v.i.px_lo = 0; - v.i.px_hi = p0.x; - v.i.py_lo = 0; - v.i.py_hi = p0.y; - - p = _mm_load_si128( &v.vec ); - - do - { - p = _mm_add_epi64( p, q ); - q = _mm_add_epi64( q, r ); - - _mm_store_si128( &v.vec, p ); - - gray_render_line( RAS_VAR_ v.i.px_hi, v.i.py_hi ); - } while ( --count ); - - return; - } -#endif /* FT_SSE2 */ - rx = LEFT_SHIFT( ax, shift + shift ); ry = LEFT_SHIFT( ay, shift + shift ); @@ -1230,7 +1138,7 @@ typedef ptrdiff_t FT_PtrDist; } while ( --count ); } -#else /* !BEZIER_USE_DDA */ +#else /* !FT_INT64 */ /* * Note that multiple attempts to speed up the function below @@ -1324,7 +1232,7 @@ typedef ptrdiff_t FT_PtrDist; } while ( --draw ); } -#endif /* !BEZIER_USE_DDA */ +#endif /* !FT_INT64 */ /* From 8f286c86ef9157ababd3294a5fb6a419756fd9d8 Mon Sep 17 00:00:00 2001 From: David Saltzman Date: Fri, 19 Jan 2024 16:42:48 -0800 Subject: [PATCH 101/191] Add support for kerning from 'GPOS' tables. This commit adds support for kerning from 'GPOS' tables, while maintaining support for basic 'kern' tables. `FT_HAS_KERNING` will be true for a font with either available and `FT_Get_Kerning` will still use the basic 'kern' table data if avilable, otherwise check the GPOS 'kern' feature. This feature is disabled by default; it can be enabled with the `TT_CONFIG_OPTION_GPOS_KERNING` flag. Only basic kerning (pair positioning with just an x advance) is supported from the GPOS layout features; support for that was added to make the existing `FT_Get_Kerning` API more consistently functional. FreeType does not intend to extend itself to further GPOS functionality though; a higher-level library like HarfBuzz can be used instead for that. * include/freetype/config/ftoption.h, include/devel/ftoption.h (TT_CONFIG_OPTION_GPOS_KERNING): New configuration option. * include/freetype/internal/fttrace.h: Add `ttgpos` trace handler. * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_gpos` and `get_gpos_kerning` fields. (FT_DEFINE_SFNT_INTERFACE): Updated. * include/freetype/internal/tttypes.h: Include `fttypes.h`. (TT_FaceRec) [TT_CONFIG_OPTION_GPOS_KERNING]: Add `gpos_table` and `gpos_kerning_available` fields. * src/sfnt/ttgpos.c, src/sfnt/ttgpos.h: New files. * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`. (sfnt_interface): Updated. * src/sfnt/sfnt.c: Include `ttgpos.c`. * src/sfnt/sfobjs.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`. (sfnt_load_face) [TT_CONFIG_OPTION_GPOS_KERNING]: Load and free GPOS kerning data; check GPOS kerning availability. * src/truetype/ttdriver.c (tt_get_kerning): Use GPOS kerning if there's no 'kern' table. --- devel/ftoption.h | 16 + docs/CHANGES | 10 + include/freetype/config/ftoption.h | 16 + include/freetype/freetype.h | 33 +- include/freetype/internal/fttrace.h | 1 + include/freetype/internal/sfnt.h | 7 + include/freetype/internal/tttypes.h | 6 + src/sfnt/sfdriver.c | 15 + src/sfnt/sfnt.c | 1 + src/sfnt/sfobjs.c | 19 +- src/sfnt/ttgpos.c | 606 ++++++++++++++++++++++++++++ src/sfnt/ttgpos.h | 53 +++ src/truetype/ttdriver.c | 15 +- 13 files changed, 790 insertions(+), 8 deletions(-) create mode 100644 src/sfnt/ttgpos.c create mode 100644 src/sfnt/ttgpos.h diff --git a/devel/ftoption.h b/devel/ftoption.h index da56abc5a..7b702d444 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -757,6 +757,22 @@ FT_BEGIN_HEADER #endif + /************************************************************************** + * + * Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning + * implementation (for TrueType fonts only). With this defined, FreeType + * is able to get kerning pair data from the GPOS 'kern' feature as well as + * legacy 'kern' tables; without this defined, FreeType will only be able + * to use legacy 'kern' tables. + * + * Note that FreeType does not support more advanced GPOS layout features; + * even the 'kern' feature implemented here doesn't handle more + * sophisticated kerning variants. Use a higher-level library like + * HarfBuzz instead for that. + */ +#define TT_CONFIG_OPTION_GPOS_KERNING + + /*************************************************************************/ /*************************************************************************/ /**** ****/ diff --git a/docs/CHANGES b/docs/CHANGES index ba40d8d92..7ccfcad99 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -11,6 +11,16 @@ CHANGES BETWEEN 2.13.2 and 2.13.3 (202Y-Mmm-DD) large performance improvement. The rendering speed has increased and even doubled for very complex glyphs. + - If the new configuration option `TT_CONFIG_OPTION_GPOS_KERNING` is + defined, `FT_Get_Kerning` understands rudimentary GPOS kerning + (for TrueType fonts only). This is not enabled by default since + its usage is very limited, mainly for legacy applications that + have to support TrueType fonts automatically converted from 'kern' + tables to GPOS kerning. If you need proper (GPOS) kerning support + please use a higher-level library like HarfBuzz. + + Code contributed by David Saltzman . + ====================================================================== diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h index 1976b33af..415f3d379 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -757,6 +757,22 @@ FT_BEGIN_HEADER #endif + /************************************************************************** + * + * Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning + * implementation (for TrueType fonts only). With this defined, FreeType + * is able to get kerning pair data from the GPOS 'kern' feature as well as + * legacy 'kern' tables; without this defined, FreeType will only be able + * to use legacy 'kern' tables. + * + * Note that FreeType does not support more advanced GPOS layout features; + * even the 'kern' feature implemented here doesn't handle more + * sophisticated kerning variants. Use a higher-level library like + * HarfBuzz instead for that. + */ +/* #define TT_CONFIG_OPTION_GPOS_KERNING */ + + /*************************************************************************/ /*************************************************************************/ /**** ****/ diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 92acf3794..9632fbc21 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -1322,9 +1322,13 @@ FT_BEGIN_HEADER * FT_FACE_FLAG_KERNING :: * The face contains kerning information. If set, the kerning distance * can be retrieved using the function @FT_Get_Kerning. Otherwise the - * function always returns the vector (0,0). Note that FreeType - * doesn't handle kerning data from the SFNT 'GPOS' table (as present - * in many OpenType fonts). + * function always returns the vector (0,0). + * + * Note that for TrueType fonts only, FreeType supports both the 'kern' + * table and the basic, pair-wise kerning feature from the 'GPOS' table + * (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though FreeType does + * not support the more advanced GPOS layout features; use a library + * like HarfBuzz for those instead. * * FT_FACE_FLAG_FAST_GLYPHS :: * THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. @@ -4058,9 +4062,26 @@ FT_BEGIN_HEADER * out of the scope of this API function -- they can be implemented * through format-specific interfaces. * - * Kerning for OpenType fonts implemented in a 'GPOS' table is not - * supported; use @FT_HAS_KERNING to find out whether a font has data - * that can be extracted with `FT_Get_Kerning`. + * Note that, for TrueType fonts only, this can extract data from both + * the 'kern' table and the basic, pair-wise kerning feature from the + * GPOS table (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though + * FreeType does not support the more advanced GPOS layout features; use + * a library like HarfBuzz for those instead. If a font has both a + * 'kern' table and kern features of a GPOS table, the 'kern' table will + * be used. + * + * Also note for right-to-left scripts, the functionality may differ for + * fonts with GPOS tables vs. 'kern' tables. For GPOS, right-to-left + * fonts typically use both a placement offset and an advance for pair + * positioning, which this API does not support, so it would output + * kerning values of zero; though if the right-to-left font used only + * advances in GPOS pair positioning, then this API could output kerning + * values for it, but it would use `left_glyph` to mean the first glyph + * for that case. Whereas 'kern' tables are always advance-only and + * always store the left glyph first. + * + * Use @FT_HAS_KERNING to find out whether a font has data that can be + * extracted with `FT_Get_Kerning`. */ FT_EXPORT( FT_Error ) FT_Get_Kerning( FT_Face face, diff --git a/include/freetype/internal/fttrace.h b/include/freetype/internal/fttrace.h index 319fe56fd..f97446956 100644 --- a/include/freetype/internal/fttrace.h +++ b/include/freetype/internal/fttrace.h @@ -64,6 +64,7 @@ FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */ FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */ FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */ FT_TRACE_DEF( ttcpal ) /* color palette table (ttcpal.c) */ +FT_TRACE_DEF( ttgpos ) /* GPOS handler (ttgpos.c) */ FT_TRACE_DEF( ttsvg ) /* OpenType SVG table (ttsvg.c) */ FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */ FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */ diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h index a2d4e15ba..5cbc32b25 100644 --- a/include/freetype/internal/sfnt.h +++ b/include/freetype/internal/sfnt.h @@ -924,6 +924,7 @@ FT_BEGIN_HEADER /* this field was called `load_kerning' up to version 2.1.10 */ TT_Load_Table_Func load_kern; + TT_Load_Table_Func load_gpos; TT_Load_Table_Func load_gasp; TT_Load_Table_Func load_pclt; @@ -944,6 +945,8 @@ FT_BEGIN_HEADER /* new elements introduced after version 2.1.10 */ + TT_Face_GetKerningFunc get_gpos_kerning; + /* load the font directory, i.e., the offset table and */ /* the table directory */ TT_Load_Table_Func load_font_dir; @@ -1002,6 +1005,7 @@ FT_BEGIN_HEADER load_name_, \ free_name_, \ load_kern_, \ + load_gpos_, \ load_gasp_, \ load_pclt_, \ load_bhed_, \ @@ -1009,6 +1013,7 @@ FT_BEGIN_HEADER get_psname_, \ free_psnames_, \ get_kerning_, \ + get_gpos_kerning_, \ load_font_dir_, \ load_hmtx_, \ load_eblc_, \ @@ -1050,6 +1055,7 @@ FT_BEGIN_HEADER load_name_, \ free_name_, \ load_kern_, \ + load_gpos_, \ load_gasp_, \ load_pclt_, \ load_bhed_, \ @@ -1057,6 +1063,7 @@ FT_BEGIN_HEADER get_psname_, \ free_psnames_, \ get_kerning_, \ + get_gpos_kerning_, \ load_font_dir_, \ load_hmtx_, \ load_eblc_, \ diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index b9788c783..ccc29887e 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/freetype/internal/tttypes.h @@ -24,6 +24,7 @@ #include #include #include +#include "freetype/fttypes.h" #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT #include @@ -1581,6 +1582,11 @@ FT_BEGIN_HEADER FT_UInt32 kern_avail_bits; FT_UInt32 kern_order_bits; +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + FT_Byte* gpos_table; + FT_Bool gpos_kerning_available; +#endif + #ifdef TT_CONFIG_OPTION_BDF TT_BDFRec bdf; #endif /* TT_CONFIG_OPTION_BDF */ diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index 0925940b0..7f0e4199a 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -49,6 +49,10 @@ #include #endif +#ifdef TT_CONFIG_OPTION_GPOS_KERNING +#include "ttgpos.h" +#endif + #include "ttcmap.h" #include "ttkern.h" #include "ttmtx.h" @@ -1249,6 +1253,12 @@ #define PUT_PS_NAMES( a ) a #else #define PUT_PS_NAMES( a ) NULL +#endif + +#ifdef TT_CONFIG_OPTION_GPOS_KERNING +#define PUT_GPOS_KERNING( a ) a +#else +#define PUT_GPOS_KERNING( a ) NULL #endif FT_DEFINE_SFNT_INTERFACE( @@ -1274,6 +1284,8 @@ tt_face_free_name, /* TT_Free_Table_Func free_name */ tt_face_load_kern, /* TT_Load_Table_Func load_kern */ + PUT_GPOS_KERNING( tt_face_load_gpos ), + /* TT_Load_Table_Func load_gpos */ tt_face_load_gasp, /* TT_Load_Table_Func load_gasp */ tt_face_load_pclt, /* TT_Load_Table_Func load_init */ @@ -1292,6 +1304,9 @@ /* since version 2.1.8 */ tt_face_get_kerning, /* TT_Face_GetKerningFunc get_kerning */ + PUT_GPOS_KERNING( tt_face_get_gpos_kerning ), + /* TT_Face_GetKerningFunc get_gpos_kerning */ + /* since version 2.2 */ tt_face_load_font_dir, /* TT_Load_Table_Func load_font_dir */ tt_face_load_hmtx, /* TT_Load_Metrics_Func load_hmtx */ diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c index 8e4f08a90..79da3b0c3 100644 --- a/src/sfnt/sfnt.c +++ b/src/sfnt/sfnt.c @@ -29,6 +29,7 @@ #include "ttcpal.c" #include "ttsvg.c" +#include "ttgpos.c" #include "ttkern.c" #include "ttload.c" #include "ttmtx.c" diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index f5d66ef84..be4336ecf 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -40,6 +40,10 @@ #include "ttbdf.h" #endif +#ifdef TT_CONFIG_OPTION_GPOS_KERNING +#include "ttgpos.h" +#endif + /************************************************************************** * @@ -1026,6 +1030,10 @@ LOAD_( gasp ); LOAD_( kern ); +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + LOAD_( gpos ); +#endif + face->root.num_glyphs = face->max_profile.numGlyphs; /* Bit 8 of the `fsSelection' field in the `OS/2' table denotes */ @@ -1119,7 +1127,11 @@ flags |= FT_FACE_FLAG_VERTICAL; /* kerning available ? */ - if ( TT_FACE_HAS_KERNING( face ) ) + if ( TT_FACE_HAS_KERNING( face ) +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + || face->gpos_kerning_available +#endif + ) flags |= FT_FACE_FLAG_KERNING; #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT @@ -1470,6 +1482,11 @@ /* freeing the kerning table */ tt_face_done_kern( face ); +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + /* freeing the GPOS table */ + tt_face_done_gpos( face ); +#endif + /* freeing the collection table */ FT_FREE( face->ttc_header.offsets ); face->ttc_header.count = 0; diff --git a/src/sfnt/ttgpos.c b/src/sfnt/ttgpos.c new file mode 100644 index 000000000..8c7ca172b --- /dev/null +++ b/src/sfnt/ttgpos.c @@ -0,0 +1,606 @@ +/**************************************************************************** + * + * ttgpos.c + * + * Load the TrueType GPOS table. The only GPOS layout feature this + * currently supports is kerning, from x advances in the pair adjustment + * layout feature. + * + * Parts of the implementation were adapted from: + * https://github.com/nothings/stb/blob/master/stb_truetype.h + * + * GPOS spec reference available at: + * https://learn.microsoft.com/en-us/typography/opentype/spec/gpos + * + * Copyright (C) 2024 by + * David Saltzman + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + */ + +#include +#include +#include +#include "freetype/fttypes.h" +#include "freetype/internal/ftobjs.h" +#include "ttgpos.h" + + +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + + /************************************************************************** + * + * The macro FT_COMPONENT is used in trace mode. It is an implicit + * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log + * messages during execution. + */ +#undef FT_COMPONENT +#define FT_COMPONENT ttgpos + + + typedef enum coverage_table_format_type_ + { + COVERAGE_TABLE_FORMAT_LIST = 1, + COVERAGE_TABLE_FORMAT_RANGE = 2 + + } coverage_table_format_type; + + typedef enum class_def_table_format_type_ + { + CLASS_DEF_TABLE_FORMAT_ARRAY = 1, + CLASS_DEF_TABLE_FORMAT_RANGE_GROUPS = 2 + + } class_def_table_format_type; + + typedef enum gpos_lookup_type_ + { + GPOS_LOOKUP_TYPE_SINGLE_ADJUSTMENT = 1, + GPOS_LOOKUP_TYPE_PAIR_ADJUSTMENT = 2, + GPOS_LOOKUP_TYPE_CURSIVE_ATTACHMENT = 3, + GPOS_LOOKUP_TYPE_MARK_TO_BASE_ATTACHMENT = 4, + GPOS_LOOKUP_TYPE_MARK_TO_LIGATURE_ATTACHMENT = 5, + GPOS_LOOKUP_TYPE_MARK_TO_MARK_ATTACHMENT = 6, + GPOS_LOOKUP_TYPE_CONTEXT_POSITIONING = 7, + GPOS_LOOKUP_TYPE_CHAINED_CONTEXT_POSITIONING = 8, + GPOS_LOOKUP_TYPE_EXTENSION_POSITIONING = 9 + + } gpos_lookup_type; + + typedef enum gpos_pair_adjustment_format_ + { + GPOS_PAIR_ADJUSTMENT_FORMAT_GLYPH_PAIR = 1, + GPOS_PAIR_ADJUSTMENT_FORMAT_CLASS_PAIR = 2 + + } gpos_pair_adjustment_format; + + typedef enum gpos_value_format_bitmask_ + { + GPOS_VALUE_FORMAT_NONE = 0x0000, + GPOS_VALUE_FORMAT_X_PLACEMENT = 0x0001, + GPOS_VALUE_FORMAT_Y_PLACEMENT = 0x0002, + GPOS_VALUE_FORMAT_X_ADVANCE = 0x0004, + GPOS_VALUE_FORMAT_Y_ADVANCE = 0x0008, + GPOS_VALUE_FORMAT_X_PLACEMENT_DEVICE = 0x0010, + GPOS_VALUE_FORMAT_Y_PLACEMENT_DEVICE = 0x0020, + GPOS_VALUE_FORMAT_X_ADVANCE_DEVICE = 0x0040, + GPOS_VALUE_FORMAT_Y_ADVANCE_DEVICE = 0x0080 + + } gpos_value_format_bitmask; + + + typedef struct TT_GPOS_Subtable_Iterator_Context_ + { + /* Iteration state. */ + FT_Byte* current_lookup_table; + gpos_lookup_type current_lookup_type; + FT_UShort subtable_count; + FT_Byte* subtable_offsets; + FT_UInt subtable_idx; + + /* Element for the current iteration. */ + FT_Byte* subtable; + gpos_lookup_type subtable_type; + + } TT_GPOS_Subtable_Iterator_Context; + + + /* Initialize a subtable iterator for a given lookup list index. */ + static void + tt_gpos_subtable_iterator_init( + TT_GPOS_Subtable_Iterator_Context* context, + FT_Byte* gpos_table, + FT_ULong lookup_list_idx ) + { + FT_Byte* lookup_list = gpos_table + FT_PEEK_USHORT( gpos_table + 8 ); + FT_UInt16 lookup_count = FT_PEEK_USHORT( lookup_list ); + + + if ( lookup_list_idx < lookup_count ) + { + context->current_lookup_table = + lookup_list + FT_PEEK_USHORT( lookup_list + 2 + 2 * lookup_list_idx ); + context->current_lookup_type = + (gpos_lookup_type)FT_PEEK_USHORT( context->current_lookup_table ); + context->subtable_count = + FT_PEEK_USHORT( context->current_lookup_table + 4 ); + context->subtable_offsets = context->current_lookup_table + 6; + } + else + { + context->current_lookup_table = NULL; + context->current_lookup_type = 0; + context->subtable_count = 0; + context->subtable_offsets = NULL; + } + + context->subtable_idx = 0; + context->subtable = NULL; + context->subtable_type = 0; + } + + + /* Get the next subtable. Return whether there was a next one. */ + static FT_Bool + tt_gpos_subtable_iterator_next( + TT_GPOS_Subtable_Iterator_Context* context ) + { + if ( context->subtable_idx < context->subtable_count ) + { + FT_UShort subtable_offset = + FT_PEEK_USHORT( context->subtable_offsets + + 2 * context->subtable_idx ); + + + context->subtable = context->current_lookup_table + subtable_offset; + + if ( context->current_lookup_type == + GPOS_LOOKUP_TYPE_EXTENSION_POSITIONING ) + { + /* Update type and subtable based on extension positioning header. */ + context->subtable_type = + (gpos_lookup_type)FT_PEEK_USHORT( context->subtable + 2 ); + context->subtable += FT_PEEK_ULONG( context->subtable + 4 ); + } + else + context->subtable_type = context->current_lookup_type; + + context->subtable_idx++; + return TRUE; + } + + return FALSE; + } + + + static FT_Int + tt_gpos_get_coverage_index( FT_Byte *coverage_table, + FT_UInt glyph ) + { + coverage_table_format_type coverage_format = + (coverage_table_format_type)FT_PEEK_USHORT( coverage_table ); + + + switch ( coverage_format ) + { + case COVERAGE_TABLE_FORMAT_LIST: + { + FT_UShort glyph_count = FT_PEEK_USHORT( coverage_table + 2 ); + + FT_Int l = 0; + FT_Int r = glyph_count - 1; + FT_Int m; + + FT_Int straw; + FT_Int needle = glyph; + + + /* Binary search. */ + while ( l <= r ) + { + FT_Byte *glyph_array = coverage_table + 4; + FT_UShort glyph_id; + + + m = ( l + r ) >> 1; + glyph_id = FT_PEEK_USHORT( glyph_array + 2 * m ); + straw = glyph_id; + + if ( needle < straw ) + r = m - 1; + else if ( needle > straw ) + l = m + 1; + else + return m; + } + break; + } + + case COVERAGE_TABLE_FORMAT_RANGE: + { + FT_UShort range_count = FT_PEEK_USHORT( coverage_table + 2 ); + FT_Byte *range_array = coverage_table + 4; + + FT_Int l = 0; + FT_Int r = range_count - 1; + FT_Int m; + + FT_Int straw_start; + FT_Int straw_end; + FT_Int needle = glyph; + + + /* Binary search. */ + while ( l <= r ) + { + FT_Byte *range_record; + + + m = ( l + r ) >> 1; + range_record = range_array + 6 * m; + straw_start = FT_PEEK_USHORT( range_record ); + straw_end = FT_PEEK_USHORT( range_record + 2 ); + + if ( needle < straw_start ) + r = m - 1; + else if ( needle > straw_end ) + l = m + 1; + else + { + FT_UShort start_coverage_index = + FT_PEEK_USHORT( range_record + 4 ); + + + return start_coverage_index + glyph - straw_start; + } + } + break; + } + + default: + return -1; /* unsupported */ + } + + return -1; + } + + + static FT_Int + tt_gpos_get_glyph_class( FT_Byte *class_def_table, + FT_UInt glyph ) + { + class_def_table_format_type class_def_format = + (class_def_table_format_type)FT_PEEK_USHORT( class_def_table ); + + + switch ( class_def_format ) + { + case CLASS_DEF_TABLE_FORMAT_ARRAY: + { + FT_UShort start_glyph_id = FT_PEEK_USHORT( class_def_table + 2 ); + FT_UShort glyph_count = FT_PEEK_USHORT( class_def_table + 4 ); + FT_Byte *class_value_array = class_def_table + 6; + + + if ( glyph >= start_glyph_id && + glyph < start_glyph_id + glyph_count ) + return (FT_Int)FT_PEEK_USHORT( class_value_array + + 2 * ( glyph - start_glyph_id ) ); + break; + } + + case CLASS_DEF_TABLE_FORMAT_RANGE_GROUPS: + { + FT_UShort class_range_count = FT_PEEK_USHORT( class_def_table + 2 ); + FT_Byte *class_range_records = class_def_table + 4; + + FT_Int l = 0; + FT_Int r = class_range_count - 1; + FT_Int m; + + FT_Int straw_start; + FT_Int straw_end; + FT_Int needle = glyph; + + + while ( l <= r ) + { + FT_Byte *class_range_record; + + + m = ( l + r ) >> 1; + class_range_record = class_range_records + 6 * m; + straw_start = FT_PEEK_USHORT( class_range_record ); + straw_end = FT_PEEK_USHORT( class_range_record + 2 ); + + if ( needle < straw_start ) + r = m - 1; + else if ( needle > straw_end ) + l = m + 1; + else + return (FT_Int)FT_PEEK_USHORT( class_range_record + 4 ); + } + break; + } + + default: + return -1; /* Unsupported definition type, return an error. */ + } + + /* "All glyphs not assigned to a class fall into class 0." */ + /* (OpenType spec) */ + return 0; + } + + + FT_LOCAL_DEF( FT_Error ) + tt_face_load_gpos( TT_Face face, + FT_Stream stream ) + { + FT_Error error; + FT_ULong table_size; + + + /* The GPOS table is optional; exit silently if it is missing. */ + error = face->goto_table( face, TTAG_GPOS, stream, &table_size ); + if ( error ) + goto Exit; + + if ( table_size < 4 ) /* the case of a malformed table */ + { + FT_ERROR(( "tt_face_load_gpos:" + " GPOS table is too small - ignored\n" )); + error = FT_THROW( Table_Missing ); + goto Exit; + } + + if ( FT_FRAME_EXTRACT( table_size, face->gpos_table ) ) + { + FT_ERROR(( "tt_face_load_gpos:" + " could not extract GPOS table\n" )); + goto Exit; + } + + face->gpos_kerning_available = FALSE; + + if ( face->gpos_table ) + { + FT_Byte* feature_list = face->gpos_table + + FT_PEEK_USHORT( face->gpos_table + 6 ); + FT_UInt16 feature_count = FT_PEEK_USHORT( feature_list ); + FT_Byte* feature_records = feature_list + 2; + + FT_UInt idx; + + + for ( idx = 0; idx < feature_count; idx++, feature_records += 6 ) + { + FT_ULong feature_tag = FT_PEEK_ULONG( feature_records ); + + + if ( feature_tag == TTAG_kern ) + { + face->gpos_kerning_available = TRUE; + break; + } + } + } + + Exit: + return error; + } + + + FT_LOCAL_DEF( void ) + tt_face_done_gpos( TT_Face face ) + { + FT_Stream stream = face->root.stream; + + + FT_FRAME_RELEASE( face->gpos_table ); + } + + + FT_LOCAL_DEF( FT_Int ) + tt_face_get_gpos_kerning( TT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph ) + { + FT_Byte* feature_list; + FT_UInt16 feature_count; + FT_Byte* feature_records; + FT_UInt feature_idx; + + + if ( !face->gpos_kerning_available ) + return 0; + + feature_list = face->gpos_table + + FT_PEEK_USHORT( face->gpos_table + 6 ); + feature_count = FT_PEEK_USHORT( feature_list ); + feature_records = feature_list + 2; + + for ( feature_idx = 0; + feature_idx < feature_count; + feature_idx++, feature_records += 6 ) + { + FT_ULong feature_tag = FT_PEEK_ULONG( feature_records ); + FT_Byte* feature_table; + FT_UInt16 lookup_idx_count; + FT_UInt16 lookup_idx; + + + if ( feature_tag != TTAG_kern ) + continue; + + feature_table = feature_list + FT_PEEK_USHORT( feature_records + 4 ); + lookup_idx_count = FT_PEEK_USHORT( feature_table + 2 ); + + for ( lookup_idx = 0; lookup_idx < lookup_idx_count; lookup_idx++ ) + { + FT_UInt16 lookup_list_idx = + FT_PEEK_USHORT( feature_table + 4 + 2 * lookup_idx ); + TT_GPOS_Subtable_Iterator_Context subtable_iter; + + + tt_gpos_subtable_iterator_init( &subtable_iter, + face->gpos_table, + lookup_list_idx ); + + while ( tt_gpos_subtable_iterator_next( &subtable_iter ) ) + { + FT_Byte* subtable; + + gpos_value_format_bitmask value_format_1; + gpos_value_format_bitmask value_format_2; + gpos_pair_adjustment_format format; + + FT_UShort coverage_offset; + FT_Int coverage_index; + + + if ( subtable_iter.subtable_type != + GPOS_LOOKUP_TYPE_PAIR_ADJUSTMENT ) + continue; + + subtable = subtable_iter.subtable; + + value_format_1 = + (gpos_value_format_bitmask)FT_PEEK_USHORT( subtable + 4 ); + value_format_2 = + (gpos_value_format_bitmask)FT_PEEK_USHORT( subtable + 6 ); + + if ( !( value_format_1 == GPOS_VALUE_FORMAT_X_ADVANCE && + value_format_2 == GPOS_VALUE_FORMAT_NONE ) ) + continue; + + format = (gpos_pair_adjustment_format)FT_PEEK_USHORT( subtable ); + + coverage_offset = FT_PEEK_USHORT( subtable + 2 ); + coverage_index = + tt_gpos_get_coverage_index( subtable + coverage_offset, + left_glyph ); + + if ( coverage_index == -1 ) + continue; + + switch ( format ) + { + case GPOS_PAIR_ADJUSTMENT_FORMAT_GLYPH_PAIR: + { + FT_Int l, r, m; + FT_Int straw, needle; + + FT_Int value_record_pair_size_in_bytes = 2; + + FT_UShort pair_set_count = FT_PEEK_USHORT( subtable + 8 ); + FT_UShort pair_pos_offset; + + FT_Byte* pair_value_table; + FT_UShort pair_value_count; + FT_Byte* pair_value_array; + + + if ( coverage_index >= pair_set_count ) + return 0; + + pair_pos_offset = + FT_PEEK_USHORT( subtable + 10 + 2 * coverage_index ); + + pair_value_table = subtable + pair_pos_offset; + pair_value_count = FT_PEEK_USHORT( pair_value_table ); + pair_value_array = pair_value_table + 2; + + needle = right_glyph; + r = pair_value_count - 1; + l = 0; + + /* Binary search. */ + while ( l <= r ) + { + FT_UShort second_glyph; + FT_Byte* pair_value; + + + m = ( l + r ) >> 1; + pair_value = pair_value_array + + ( 2 + value_record_pair_size_in_bytes ) * m; + second_glyph = FT_PEEK_USHORT( pair_value ); + straw = second_glyph; + + if ( needle < straw ) + r = m - 1; + else if ( needle > straw ) + l = m + 1; + else + { + FT_Short x_advance = FT_PEEK_SHORT( pair_value + 2 ); + + + return x_advance; + } + } + break; + } + + case GPOS_PAIR_ADJUSTMENT_FORMAT_CLASS_PAIR: + { + FT_UShort class_def1_offset = FT_PEEK_USHORT( subtable + 8 ); + FT_UShort class_def2_offset = FT_PEEK_USHORT( subtable + 10 ); + + FT_Int left_glyph_class = + tt_gpos_get_glyph_class( subtable + class_def1_offset, + left_glyph ); + FT_Int right_glyph_class = + tt_gpos_get_glyph_class( subtable + class_def2_offset, + right_glyph ); + + FT_UShort class1_count = FT_PEEK_USHORT( subtable + 12 ); + FT_UShort class2_count = FT_PEEK_USHORT( subtable + 14 ); + + FT_Byte *class1_records, *class2_records; + FT_Short x_advance; + + + if ( left_glyph_class < 0 || + left_glyph_class >= class1_count ) + return 0; /* malformed */ + if ( right_glyph_class < 0 || + right_glyph_class >= class2_count ) + return 0; /* malformed */ + + if ( right_glyph_class == 0 ) + continue; /* right glyph not found in this table */ + + class1_records = subtable + 16; + class2_records = + class1_records + 2 * ( left_glyph_class * class2_count ); + + x_advance = + FT_PEEK_SHORT( class2_records + 2 * right_glyph_class ); + + return x_advance; + } + + default: + return 0; + } + } + } + } + + return 0; + } + +#else /* !TT_CONFIG_OPTION_GPOS_KERNING */ + + /* ANSI C doesn't like empty source files */ + typedef int tt_gpos_dummy_; + +#endif /* !TT_CONFIG_OPTION_GPOS_KERNING */ + + +/* END */ diff --git a/src/sfnt/ttgpos.h b/src/sfnt/ttgpos.h new file mode 100644 index 000000000..570e9e3d7 --- /dev/null +++ b/src/sfnt/ttgpos.h @@ -0,0 +1,53 @@ +/**************************************************************************** + * + * ttgpos.c + * + * Load the TrueType GPOS table. The only GPOS layout feature this + * currently supports is kerning, from x advances in the pair adjustment + * layout feature. + * + * Copyright (C) 2024 by + * David Saltzman + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + */ + + +#ifndef TTGPOS_H_ +#define TTGPOS_H_ + + +#include +#include + + +FT_BEGIN_HEADER + + +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + + FT_LOCAL( FT_Error ) + tt_face_load_gpos( TT_Face face, + FT_Stream stream ); + + FT_LOCAL( void ) + tt_face_done_gpos( TT_Face face ); + + FT_LOCAL( FT_Int ) + tt_face_get_gpos_kerning( TT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph ); + +#endif /* TT_CONFIG_OPTION_GPOS_KERNING */ + + +FT_END_HEADER + +#endif /* TTGPOS_H_ */ + + +/* END */ diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c index d1496fec7..6b0acda37 100644 --- a/src/truetype/ttdriver.c +++ b/src/truetype/ttdriver.c @@ -217,7 +217,20 @@ kerning->y = 0; if ( sfnt ) - kerning->x = sfnt->get_kerning( ttface, left_glyph, right_glyph ); + { + /* Use 'kern' table if available since that can be faster; otherwise */ + /* use GPOS kerning pairs if available. */ + if ( ttface->kern_avail_bits != 0 ) + kerning->x = sfnt->get_kerning( ttface, + left_glyph, + right_glyph ); +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + else if ( ttface->gpos_kerning_available ) + kerning->x = sfnt->get_gpos_kerning( ttface, + left_glyph, + right_glyph ); +#endif + } return 0; } From 4f0256c13fa541dc320975d988d370ba91691fdf Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 27 Jan 2024 10:47:10 -0500 Subject: [PATCH 102/191] * src/sfnt/ttgpos.c (tt_gpos_get_glyph_class): Fix warning C4018. --- src/sfnt/ttgpos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sfnt/ttgpos.c b/src/sfnt/ttgpos.c index 8c7ca172b..c5dd043d6 100644 --- a/src/sfnt/ttgpos.c +++ b/src/sfnt/ttgpos.c @@ -280,9 +280,9 @@ { case CLASS_DEF_TABLE_FORMAT_ARRAY: { - FT_UShort start_glyph_id = FT_PEEK_USHORT( class_def_table + 2 ); - FT_UShort glyph_count = FT_PEEK_USHORT( class_def_table + 4 ); - FT_Byte *class_value_array = class_def_table + 6; + FT_UInt start_glyph_id = FT_PEEK_USHORT( class_def_table + 2 ); + FT_UInt glyph_count = FT_PEEK_USHORT( class_def_table + 4 ); + FT_Byte *class_value_array = class_def_table + 6; if ( glyph >= start_glyph_id && From 47574f7ea445c8bb751da0fa716424c9c29a6807 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 27 Jan 2024 11:11:22 -0500 Subject: [PATCH 103/191] Update all copyright notices. --- CMakeLists.txt | 2 +- Makefile | 2 +- README | 2 +- README.git | 2 +- autogen.sh | 2 +- builds/amiga/README | 2 +- builds/amiga/include/config/ftconfig.h | 2 +- builds/amiga/include/config/ftmodule.h | 2 +- builds/amiga/makefile | 2 +- builds/amiga/makefile.os4 | 2 +- builds/amiga/smakefile | 2 +- builds/amiga/src/base/ftdebug.c | 2 +- builds/amiga/src/base/ftsystem.c | 2 +- builds/ansi/ansi-def.mk | 2 +- builds/ansi/ansi.mk | 2 +- builds/beos/beos-def.mk | 2 +- builds/beos/beos.mk | 2 +- builds/beos/detect.mk | 2 +- builds/cmake/FindBrotliDec.cmake | 2 +- builds/cmake/iOS.cmake | 2 +- builds/cmake/testbuild.sh | 2 +- builds/compiler/ansi-cc.mk | 2 +- builds/compiler/bcc-dev.mk | 2 +- builds/compiler/bcc.mk | 2 +- builds/compiler/emx.mk | 2 +- builds/compiler/gcc-dev.mk | 2 +- builds/compiler/gcc.mk | 2 +- builds/compiler/intelc.mk | 2 +- builds/compiler/unix-lcc.mk | 2 +- builds/compiler/visualage.mk | 2 +- builds/compiler/visualc.mk | 2 +- builds/compiler/watcom.mk | 2 +- builds/compiler/win-lcc.mk | 2 +- builds/detect.mk | 2 +- builds/dos/detect.mk | 2 +- builds/dos/dos-def.mk | 2 +- builds/dos/dos-emx.mk | 2 +- builds/dos/dos-gcc.mk | 2 +- builds/dos/dos-wat.mk | 2 +- builds/exports.mk | 2 +- builds/freetype.mk | 2 +- builds/link_dos.mk | 2 +- builds/link_std.mk | 2 +- builds/mac/ftmac.c | 2 +- builds/meson/extract_freetype_version.py | 2 +- builds/meson/extract_libtool_version.py | 2 +- builds/meson/generate_reference_docs.py | 2 +- builds/meson/parse_modules_cfg.py | 2 +- builds/meson/process_ftoption_h.py | 2 +- builds/modules.mk | 2 +- builds/os2/detect.mk | 2 +- builds/os2/os2-def.mk | 2 +- builds/os2/os2-dev.mk | 2 +- builds/os2/os2-gcc.mk | 2 +- builds/symbian/bld.inf | 2 +- builds/symbian/freetype.mmp | 2 +- builds/toplevel.mk | 2 +- builds/unix/configure.raw | 2 +- builds/unix/detect.mk | 2 +- builds/unix/freetype-config.in | 2 +- builds/unix/freetype2.m4 | 2 +- builds/unix/ft-munmap.m4 | 2 +- builds/unix/ftconfig.h.in | 2 +- builds/unix/ftsystem.c | 2 +- builds/unix/install.mk | 2 +- builds/unix/unix-cc.in | 2 +- builds/unix/unix-def.in | 2 +- builds/unix/unix-dev.mk | 2 +- builds/unix/unix-lcc.mk | 2 +- builds/unix/unix.mk | 2 +- builds/unix/unixddef.mk | 2 +- builds/vms/ftconfig.h | 2 +- builds/vms/ftsystem.c | 2 +- builds/wince/ftdebug.c | 2 +- builds/windows/detect.mk | 2 +- builds/windows/ftdebug.c | 2 +- builds/windows/ftsystem.c | 2 +- builds/windows/w32-bcc.mk | 2 +- builds/windows/w32-bccd.mk | 2 +- builds/windows/w32-dev.mk | 2 +- builds/windows/w32-gcc.mk | 2 +- builds/windows/w32-icc.mk | 2 +- builds/windows/w32-intl.mk | 2 +- builds/windows/w32-lcc.mk | 2 +- builds/windows/w32-mingw32.mk | 2 +- builds/windows/w32-vcc.mk | 2 +- builds/windows/w32-wat.mk | 2 +- builds/windows/win32-def.mk | 2 +- configure | 2 +- devel/ft2build.h | 2 +- devel/ftoption.h | 2 +- docs/CHANGES | 2 +- docs/CUSTOMIZE | 2 +- docs/DEBUG | 2 +- docs/DOCGUIDE | 2 +- docs/INSTALL | 2 +- docs/INSTALL.ANY | 2 +- docs/INSTALL.CROSS | 2 +- docs/INSTALL.GNU | 2 +- docs/INSTALL.UNIX | 2 +- docs/INSTALL.VMS | 2 +- docs/TODO | 2 +- docs/VERSIONS.TXT | 2 +- docs/formats.txt | 2 +- docs/oldlogs/ChangeLog.20 | 2 +- docs/oldlogs/ChangeLog.21 | 2 +- docs/oldlogs/ChangeLog.210 | 2 +- docs/oldlogs/ChangeLog.22 | 2 +- docs/oldlogs/ChangeLog.23 | 2 +- docs/oldlogs/ChangeLog.24 | 2 +- docs/oldlogs/ChangeLog.25 | 2 +- docs/oldlogs/ChangeLog.26 | 2 +- docs/oldlogs/ChangeLog.27 | 2 +- docs/oldlogs/ChangeLog.28 | 2 +- docs/oldlogs/ChangeLog.29 | 2 +- docs/raster.txt | 2 +- docs/release | 2 +- include/freetype/config/ftconfig.h | 2 +- include/freetype/config/ftheader.h | 2 +- include/freetype/config/ftoption.h | 2 +- include/freetype/config/ftstdlib.h | 2 +- include/freetype/config/integer-types.h | 2 +- include/freetype/config/mac-support.h | 2 +- include/freetype/config/public-macros.h | 2 +- include/freetype/freetype.h | 2 +- include/freetype/ftadvanc.h | 2 +- include/freetype/ftbbox.h | 2 +- include/freetype/ftbdf.h | 2 +- include/freetype/ftbitmap.h | 2 +- include/freetype/ftbzip2.h | 2 +- include/freetype/ftcache.h | 2 +- include/freetype/ftcid.h | 2 +- include/freetype/ftcolor.h | 2 +- include/freetype/ftdriver.h | 2 +- include/freetype/fterrdef.h | 2 +- include/freetype/fterrors.h | 2 +- include/freetype/ftfntfmt.h | 2 +- include/freetype/ftgasp.h | 2 +- include/freetype/ftglyph.h | 2 +- include/freetype/ftgxval.h | 2 +- include/freetype/ftgzip.h | 2 +- include/freetype/ftimage.h | 2 +- include/freetype/ftincrem.h | 2 +- include/freetype/ftlcdfil.h | 2 +- include/freetype/ftlist.h | 2 +- include/freetype/ftlogging.h | 2 +- include/freetype/ftlzw.h | 2 +- include/freetype/ftmac.h | 2 +- include/freetype/ftmm.h | 2 +- include/freetype/ftmodapi.h | 2 +- include/freetype/ftmoderr.h | 2 +- include/freetype/ftotval.h | 2 +- include/freetype/ftoutln.h | 2 +- include/freetype/ftparams.h | 2 +- include/freetype/ftpfr.h | 2 +- include/freetype/ftrender.h | 2 +- include/freetype/ftsizes.h | 2 +- include/freetype/ftsnames.h | 2 +- include/freetype/ftstroke.h | 2 +- include/freetype/ftsynth.h | 2 +- include/freetype/ftsystem.h | 2 +- include/freetype/fttrigon.h | 2 +- include/freetype/fttypes.h | 2 +- include/freetype/ftwinfnt.h | 2 +- include/freetype/internal/autohint.h | 2 +- include/freetype/internal/cffotypes.h | 2 +- include/freetype/internal/cfftypes.h | 2 +- include/freetype/internal/compiler-macros.h | 2 +- include/freetype/internal/ftcalc.h | 2 +- include/freetype/internal/ftdebug.h | 2 +- include/freetype/internal/ftdrv.h | 2 +- include/freetype/internal/ftgloadr.h | 2 +- include/freetype/internal/ftmemory.h | 2 +- include/freetype/internal/ftmmtypes.h | 2 +- include/freetype/internal/ftobjs.h | 2 +- include/freetype/internal/ftpsprop.h | 2 +- include/freetype/internal/ftrfork.h | 2 +- include/freetype/internal/ftserv.h | 2 +- include/freetype/internal/ftstream.h | 2 +- include/freetype/internal/fttrace.h | 2 +- include/freetype/internal/ftvalid.h | 2 +- include/freetype/internal/psaux.h | 2 +- include/freetype/internal/pshints.h | 2 +- include/freetype/internal/services/svbdf.h | 2 +- include/freetype/internal/services/svcfftl.h | 2 +- include/freetype/internal/services/svcid.h | 2 +- include/freetype/internal/services/svfntfmt.h | 2 +- include/freetype/internal/services/svgldict.h | 2 +- include/freetype/internal/services/svgxval.h | 2 +- include/freetype/internal/services/svkern.h | 2 +- include/freetype/internal/services/svmetric.h | 2 +- include/freetype/internal/services/svmm.h | 2 +- include/freetype/internal/services/svotval.h | 2 +- include/freetype/internal/services/svpfr.h | 2 +- include/freetype/internal/services/svpostnm.h | 2 +- include/freetype/internal/services/svprop.h | 2 +- include/freetype/internal/services/svpscmap.h | 2 +- include/freetype/internal/services/svpsinfo.h | 2 +- include/freetype/internal/services/svsfnt.h | 2 +- include/freetype/internal/services/svttcmap.h | 2 +- include/freetype/internal/services/svtteng.h | 2 +- include/freetype/internal/services/svttglyf.h | 2 +- include/freetype/internal/services/svwinfnt.h | 2 +- include/freetype/internal/sfnt.h | 2 +- include/freetype/internal/svginterface.h | 2 +- include/freetype/internal/t1types.h | 2 +- include/freetype/internal/tttypes.h | 2 +- include/freetype/internal/wofftypes.h | 2 +- include/freetype/otsvg.h | 2 +- include/freetype/t1tables.h | 2 +- include/freetype/ttnameid.h | 2 +- include/freetype/tttables.h | 2 +- include/freetype/tttags.h | 2 +- include/ft2build.h | 2 +- meson.build | 2 +- meson_options.txt | 2 +- modules.cfg | 2 +- src/autofit/afblue.c | 2 +- src/autofit/afblue.cin | 2 +- src/autofit/afblue.dat | 2 +- src/autofit/afblue.h | 2 +- src/autofit/afblue.hin | 2 +- src/autofit/afcjk.c | 2 +- src/autofit/afcjk.h | 2 +- src/autofit/afcover.h | 2 +- src/autofit/afdummy.c | 2 +- src/autofit/afdummy.h | 2 +- src/autofit/aferrors.h | 2 +- src/autofit/afglobal.c | 2 +- src/autofit/afglobal.h | 2 +- src/autofit/afhints.c | 2 +- src/autofit/afhints.h | 2 +- src/autofit/afindic.c | 2 +- src/autofit/afindic.h | 2 +- src/autofit/aflatin.c | 2 +- src/autofit/aflatin.h | 2 +- src/autofit/afloader.c | 2 +- src/autofit/afloader.h | 2 +- src/autofit/afmodule.c | 2 +- src/autofit/afmodule.h | 2 +- src/autofit/afranges.c | 2 +- src/autofit/afranges.h | 2 +- src/autofit/afscript.h | 2 +- src/autofit/afshaper.c | 2 +- src/autofit/afshaper.h | 2 +- src/autofit/afstyles.h | 2 +- src/autofit/aftypes.h | 2 +- src/autofit/afws-decl.h | 2 +- src/autofit/afws-iter.h | 2 +- src/autofit/autofit.c | 2 +- src/autofit/module.mk | 2 +- src/autofit/rules.mk | 2 +- src/base/ftadvanc.c | 2 +- src/base/ftbase.c | 2 +- src/base/ftbase.h | 2 +- src/base/ftbbox.c | 2 +- src/base/ftbdf.c | 2 +- src/base/ftbitmap.c | 2 +- src/base/ftcalc.c | 2 +- src/base/ftcid.c | 2 +- src/base/ftcolor.c | 2 +- src/base/ftdbgmem.c | 2 +- src/base/ftdebug.c | 2 +- src/base/fterrors.c | 2 +- src/base/ftfntfmt.c | 2 +- src/base/ftfstype.c | 2 +- src/base/ftgasp.c | 2 +- src/base/ftgloadr.c | 2 +- src/base/ftglyph.c | 2 +- src/base/ftgxval.c | 2 +- src/base/ftinit.c | 2 +- src/base/ftlcdfil.c | 2 +- src/base/ftmac.c | 2 +- src/base/ftmm.c | 2 +- src/base/ftobjs.c | 2 +- src/base/ftotval.c | 2 +- src/base/ftoutln.c | 2 +- src/base/ftpatent.c | 2 +- src/base/ftpfr.c | 2 +- src/base/ftpsprop.c | 2 +- src/base/ftrfork.c | 2 +- src/base/ftsnames.c | 2 +- src/base/ftstream.c | 2 +- src/base/ftstroke.c | 2 +- src/base/ftsynth.c | 2 +- src/base/ftsystem.c | 2 +- src/base/fttrigon.c | 2 +- src/base/fttype1.c | 2 +- src/base/ftutil.c | 2 +- src/base/ftver.rc | 2 +- src/base/ftwinfnt.c | 2 +- src/base/rules.mk | 2 +- src/bzip2/ftbzip2.c | 2 +- src/bzip2/rules.mk | 2 +- src/cache/ftcache.c | 2 +- src/cache/ftcbasic.c | 2 +- src/cache/ftccache.c | 2 +- src/cache/ftccache.h | 2 +- src/cache/ftccback.h | 2 +- src/cache/ftccmap.c | 2 +- src/cache/ftcerror.h | 2 +- src/cache/ftcglyph.c | 2 +- src/cache/ftcglyph.h | 2 +- src/cache/ftcimage.c | 2 +- src/cache/ftcimage.h | 2 +- src/cache/ftcmanag.c | 2 +- src/cache/ftcmanag.h | 2 +- src/cache/ftcmru.c | 2 +- src/cache/ftcmru.h | 2 +- src/cache/ftcsbits.c | 2 +- src/cache/ftcsbits.h | 2 +- src/cache/rules.mk | 2 +- src/cff/cff.c | 2 +- src/cff/cffcmap.c | 2 +- src/cff/cffcmap.h | 2 +- src/cff/cffdrivr.c | 2 +- src/cff/cffdrivr.h | 2 +- src/cff/cfferrs.h | 2 +- src/cff/cffgload.c | 2 +- src/cff/cffgload.h | 2 +- src/cff/cffload.c | 2 +- src/cff/cffload.h | 2 +- src/cff/cffobjs.c | 2 +- src/cff/cffobjs.h | 2 +- src/cff/cffparse.c | 2 +- src/cff/cffparse.h | 2 +- src/cff/cfftoken.h | 2 +- src/cff/module.mk | 2 +- src/cff/rules.mk | 2 +- src/cid/ciderrs.h | 2 +- src/cid/cidgload.c | 2 +- src/cid/cidgload.h | 2 +- src/cid/cidload.c | 2 +- src/cid/cidload.h | 2 +- src/cid/cidobjs.c | 2 +- src/cid/cidobjs.h | 2 +- src/cid/cidparse.c | 2 +- src/cid/cidparse.h | 2 +- src/cid/cidriver.c | 2 +- src/cid/cidriver.h | 2 +- src/cid/cidtoken.h | 2 +- src/cid/module.mk | 2 +- src/cid/rules.mk | 2 +- src/cid/type1cid.c | 2 +- src/dlg/dlgwrap.c | 2 +- src/dlg/rules.mk | 2 +- src/gxvalid/README | 2 +- src/gxvalid/gxvalid.c | 2 +- src/gxvalid/gxvalid.h | 2 +- src/gxvalid/gxvbsln.c | 2 +- src/gxvalid/gxvcommn.c | 2 +- src/gxvalid/gxvcommn.h | 2 +- src/gxvalid/gxverror.h | 2 +- src/gxvalid/gxvfeat.c | 2 +- src/gxvalid/gxvfeat.h | 2 +- src/gxvalid/gxvfgen.c | 2 +- src/gxvalid/gxvjust.c | 2 +- src/gxvalid/gxvkern.c | 2 +- src/gxvalid/gxvlcar.c | 2 +- src/gxvalid/gxvmod.c | 2 +- src/gxvalid/gxvmod.h | 2 +- src/gxvalid/gxvmort.c | 2 +- src/gxvalid/gxvmort.h | 2 +- src/gxvalid/gxvmort0.c | 2 +- src/gxvalid/gxvmort1.c | 2 +- src/gxvalid/gxvmort2.c | 2 +- src/gxvalid/gxvmort4.c | 2 +- src/gxvalid/gxvmort5.c | 2 +- src/gxvalid/gxvmorx.c | 2 +- src/gxvalid/gxvmorx.h | 2 +- src/gxvalid/gxvmorx0.c | 2 +- src/gxvalid/gxvmorx1.c | 2 +- src/gxvalid/gxvmorx2.c | 2 +- src/gxvalid/gxvmorx4.c | 2 +- src/gxvalid/gxvmorx5.c | 2 +- src/gxvalid/gxvopbd.c | 2 +- src/gxvalid/gxvprop.c | 2 +- src/gxvalid/gxvtrak.c | 2 +- src/gxvalid/module.mk | 2 +- src/gxvalid/rules.mk | 2 +- src/gzip/ftgzip.c | 2 +- src/gzip/rules.mk | 2 +- src/lzw/ftlzw.c | 2 +- src/lzw/ftzopen.c | 2 +- src/lzw/ftzopen.h | 2 +- src/lzw/rules.mk | 2 +- src/otvalid/module.mk | 2 +- src/otvalid/otvalid.c | 2 +- src/otvalid/otvalid.h | 2 +- src/otvalid/otvbase.c | 2 +- src/otvalid/otvcommn.c | 2 +- src/otvalid/otvcommn.h | 2 +- src/otvalid/otverror.h | 2 +- src/otvalid/otvgdef.c | 2 +- src/otvalid/otvgpos.c | 2 +- src/otvalid/otvgpos.h | 2 +- src/otvalid/otvgsub.c | 2 +- src/otvalid/otvjstf.c | 2 +- src/otvalid/otvmath.c | 2 +- src/otvalid/otvmod.c | 2 +- src/otvalid/otvmod.h | 2 +- src/otvalid/rules.mk | 2 +- src/pfr/module.mk | 2 +- src/pfr/pfr.c | 2 +- src/pfr/pfrcmap.c | 2 +- src/pfr/pfrcmap.h | 2 +- src/pfr/pfrdrivr.c | 2 +- src/pfr/pfrdrivr.h | 2 +- src/pfr/pfrerror.h | 2 +- src/pfr/pfrgload.c | 2 +- src/pfr/pfrgload.h | 2 +- src/pfr/pfrload.c | 2 +- src/pfr/pfrload.h | 2 +- src/pfr/pfrobjs.c | 2 +- src/pfr/pfrobjs.h | 2 +- src/pfr/pfrsbit.c | 2 +- src/pfr/pfrsbit.h | 2 +- src/pfr/pfrtypes.h | 2 +- src/pfr/rules.mk | 2 +- src/psaux/afmparse.c | 2 +- src/psaux/afmparse.h | 2 +- src/psaux/cffdecode.c | 2 +- src/psaux/cffdecode.h | 2 +- src/psaux/module.mk | 2 +- src/psaux/psaux.c | 2 +- src/psaux/psauxerr.h | 2 +- src/psaux/psauxmod.c | 2 +- src/psaux/psauxmod.h | 2 +- src/psaux/psconv.c | 2 +- src/psaux/psconv.h | 2 +- src/psaux/psobjs.c | 2 +- src/psaux/psobjs.h | 2 +- src/psaux/rules.mk | 2 +- src/psaux/t1cmap.c | 2 +- src/psaux/t1cmap.h | 2 +- src/psaux/t1decode.c | 2 +- src/psaux/t1decode.h | 2 +- src/pshinter/module.mk | 2 +- src/pshinter/pshalgo.c | 2 +- src/pshinter/pshalgo.h | 2 +- src/pshinter/pshglob.c | 2 +- src/pshinter/pshglob.h | 2 +- src/pshinter/pshinter.c | 2 +- src/pshinter/pshmod.c | 2 +- src/pshinter/pshmod.h | 2 +- src/pshinter/pshnterr.h | 2 +- src/pshinter/pshrec.c | 2 +- src/pshinter/pshrec.h | 2 +- src/pshinter/rules.mk | 2 +- src/psnames/module.mk | 2 +- src/psnames/psmodule.c | 2 +- src/psnames/psmodule.h | 2 +- src/psnames/psnamerr.h | 2 +- src/psnames/psnames.c | 2 +- src/psnames/pstables.h | 2 +- src/psnames/rules.mk | 2 +- src/raster/ftmisc.h | 2 +- src/raster/ftraster.c | 2 +- src/raster/ftraster.h | 2 +- src/raster/ftrend1.c | 2 +- src/raster/ftrend1.h | 2 +- src/raster/module.mk | 2 +- src/raster/raster.c | 2 +- src/raster/rasterrs.h | 2 +- src/raster/rules.mk | 2 +- src/sdf/ftbsdf.c | 2 +- src/sdf/ftsdf.c | 2 +- src/sdf/ftsdf.h | 2 +- src/sdf/ftsdfcommon.c | 2 +- src/sdf/ftsdfcommon.h | 2 +- src/sdf/ftsdferrs.h | 2 +- src/sdf/ftsdfrend.c | 2 +- src/sdf/ftsdfrend.h | 2 +- src/sdf/module.mk | 2 +- src/sdf/rules.mk | 2 +- src/sdf/sdf.c | 2 +- src/sfnt/module.mk | 2 +- src/sfnt/pngshim.c | 2 +- src/sfnt/pngshim.h | 2 +- src/sfnt/rules.mk | 2 +- src/sfnt/sfdriver.c | 2 +- src/sfnt/sfdriver.h | 2 +- src/sfnt/sferrors.h | 2 +- src/sfnt/sfnt.c | 2 +- src/sfnt/sfobjs.c | 2 +- src/sfnt/sfobjs.h | 2 +- src/sfnt/sfwoff.c | 2 +- src/sfnt/sfwoff.h | 2 +- src/sfnt/sfwoff2.c | 2 +- src/sfnt/sfwoff2.h | 2 +- src/sfnt/ttbdf.c | 2 +- src/sfnt/ttbdf.h | 2 +- src/sfnt/ttcmap.c | 2 +- src/sfnt/ttcmap.h | 2 +- src/sfnt/ttcmapc.h | 2 +- src/sfnt/ttcolr.c | 2 +- src/sfnt/ttcolr.h | 2 +- src/sfnt/ttcpal.c | 2 +- src/sfnt/ttcpal.h | 2 +- src/sfnt/ttkern.c | 2 +- src/sfnt/ttkern.h | 2 +- src/sfnt/ttload.c | 2 +- src/sfnt/ttload.h | 2 +- src/sfnt/ttmtx.c | 2 +- src/sfnt/ttmtx.h | 2 +- src/sfnt/ttpost.c | 2 +- src/sfnt/ttpost.h | 2 +- src/sfnt/ttsbit.c | 2 +- src/sfnt/ttsbit.h | 2 +- src/sfnt/ttsvg.c | 2 +- src/sfnt/ttsvg.h | 2 +- src/sfnt/woff2tags.c | 2 +- src/sfnt/woff2tags.h | 2 +- src/smooth/ftgrays.c | 2 +- src/smooth/ftgrays.h | 2 +- src/smooth/ftsmerrs.h | 2 +- src/smooth/ftsmooth.c | 2 +- src/smooth/ftsmooth.h | 2 +- src/smooth/module.mk | 2 +- src/smooth/rules.mk | 2 +- src/smooth/smooth.c | 2 +- src/svg/ftsvg.c | 2 +- src/svg/ftsvg.h | 2 +- src/svg/module.mk | 2 +- src/svg/rules.mk | 2 +- src/svg/svg.c | 2 +- src/svg/svgtypes.h | 2 +- src/tools/afblue.pl | 2 +- src/tools/glnames.py | 2 +- src/tools/update-copyright-year | 2 +- src/truetype/module.mk | 2 +- src/truetype/rules.mk | 2 +- src/truetype/truetype.c | 2 +- src/truetype/ttdriver.c | 2 +- src/truetype/ttdriver.h | 2 +- src/truetype/tterrors.h | 2 +- src/truetype/ttgload.c | 2 +- src/truetype/ttgload.h | 2 +- src/truetype/ttgxvar.c | 2 +- src/truetype/ttgxvar.h | 2 +- src/truetype/ttinterp.c | 2 +- src/truetype/ttinterp.h | 2 +- src/truetype/ttobjs.c | 2 +- src/truetype/ttobjs.h | 2 +- src/truetype/ttpload.c | 2 +- src/truetype/ttpload.h | 2 +- src/type1/module.mk | 2 +- src/type1/rules.mk | 2 +- src/type1/t1afm.c | 2 +- src/type1/t1afm.h | 2 +- src/type1/t1driver.c | 2 +- src/type1/t1driver.h | 2 +- src/type1/t1errors.h | 2 +- src/type1/t1gload.c | 2 +- src/type1/t1gload.h | 2 +- src/type1/t1load.c | 2 +- src/type1/t1load.h | 2 +- src/type1/t1objs.c | 2 +- src/type1/t1objs.h | 2 +- src/type1/t1parse.c | 2 +- src/type1/t1parse.h | 2 +- src/type1/t1tokens.h | 2 +- src/type1/type1.c | 2 +- src/type42/module.mk | 2 +- src/type42/rules.mk | 2 +- src/type42/t42drivr.c | 2 +- src/type42/t42drivr.h | 2 +- src/type42/t42error.h | 2 +- src/type42/t42objs.c | 2 +- src/type42/t42objs.h | 2 +- src/type42/t42parse.c | 2 +- src/type42/t42parse.h | 2 +- src/type42/t42types.h | 2 +- src/type42/type42.c | 2 +- src/winfonts/fnterrs.h | 2 +- src/winfonts/module.mk | 2 +- src/winfonts/rules.mk | 2 +- src/winfonts/winfnt.c | 2 +- src/winfonts/winfnt.h | 2 +- vms_make.com | 2 +- 580 files changed, 580 insertions(+), 580 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbee5b388..c0ca0f2b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright (C) 2013-2023 by +# Copyright (C) 2013-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written originally by John Cary diff --git a/Makefile b/Makefile index 14fba3022..030ca03b8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/README b/README index cd4c1d7d1..19c934256 100644 --- a/README +++ b/README @@ -94,7 +94,7 @@ Enjoy! ---------------------------------------------------------------------- -Copyright (C) 2006-2023 by +Copyright (C) 2006-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/README.git b/README.git index 117d74f0d..c818bbb5f 100644 --- a/README.git +++ b/README.git @@ -89,7 +89,7 @@ address: ---------------------------------------------------------------------- -Copyright (C) 2005-2023 by +Copyright (C) 2005-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/autogen.sh b/autogen.sh index 649c644a4..7285a0155 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2005-2023 by +# Copyright (C) 2005-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/README b/builds/amiga/README index 5b2abef3d..aec3bc4f3 100644 --- a/builds/amiga/README +++ b/builds/amiga/README @@ -1,7 +1,7 @@ README for the builds/amiga subdirectory. -Copyright (C) 2005-2023 by +Copyright (C) 2005-2024 by Werner Lemberg and Detlef Würkner. This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/include/config/ftconfig.h b/builds/amiga/include/config/ftconfig.h index de074bf83..f26b8e0f9 100644 --- a/builds/amiga/include/config/ftconfig.h +++ b/builds/amiga/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific configuration file (specification only). */ /* */ -/* Copyright (C) 2005-2023 by */ +/* Copyright (C) 2005-2024 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/include/config/ftmodule.h b/builds/amiga/include/config/ftmodule.h index bf3336743..a7be0a426 100644 --- a/builds/amiga/include/config/ftmodule.h +++ b/builds/amiga/include/config/ftmodule.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType module selection. */ /* */ -/* Copyright (C) 2005-2023 by */ +/* Copyright (C) 2005-2024 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/makefile b/builds/amiga/makefile index 4a33fdd92..61b4a98f4 100644 --- a/builds/amiga/makefile +++ b/builds/amiga/makefile @@ -5,7 +5,7 @@ # -# Copyright (C) 2005-2023 by +# Copyright (C) 2005-2024 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/makefile.os4 b/builds/amiga/makefile.os4 index dfc3e9f19..fcf712603 100644 --- a/builds/amiga/makefile.os4 +++ b/builds/amiga/makefile.os4 @@ -4,7 +4,7 @@ # -# Copyright (C) 2005-2023 by +# Copyright (C) 2005-2024 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile index ca3da6634..9efb362c2 100644 --- a/builds/amiga/smakefile +++ b/builds/amiga/smakefile @@ -3,7 +3,7 @@ # -# Copyright (C) 2005-2023 by +# Copyright (C) 2005-2024 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c index a20929749..4d8addbfc 100644 --- a/builds/amiga/src/base/ftdebug.c +++ b/builds/amiga/src/base/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for amiga (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Detlef Wuerkner. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c index d85845c81..7f1a0ea30 100644 --- a/builds/amiga/src/base/ftsystem.c +++ b/builds/amiga/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType low-level system interface (body). */ /* */ -/* Copyright (C) 1996-2023 by */ +/* Copyright (C) 1996-2024 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/ansi/ansi-def.mk b/builds/ansi/ansi-def.mk index 82178932f..687af1041 100644 --- a/builds/ansi/ansi-def.mk +++ b/builds/ansi/ansi-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/ansi/ansi.mk b/builds/ansi/ansi.mk index ad40939b5..ec4076e77 100644 --- a/builds/ansi/ansi.mk +++ b/builds/ansi/ansi.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/beos/beos-def.mk b/builds/beos/beos-def.mk index 1cca80cce..30e79dbaa 100644 --- a/builds/beos/beos-def.mk +++ b/builds/beos/beos-def.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/beos/beos.mk b/builds/beos/beos.mk index 69ca1f1b0..eb9fde4be 100644 --- a/builds/beos/beos.mk +++ b/builds/beos/beos.mk @@ -2,7 +2,7 @@ # FreeType 2 configuration rules for a BeOS system # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/beos/detect.mk b/builds/beos/detect.mk index dd1b5a61a..874e8a8c2 100644 --- a/builds/beos/detect.mk +++ b/builds/beos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake index 81036cb10..385f0abc5 100644 --- a/builds/cmake/FindBrotliDec.cmake +++ b/builds/cmake/FindBrotliDec.cmake @@ -1,6 +1,6 @@ # FindBrotliDec.cmake # -# Copyright (C) 2019-2023 by +# Copyright (C) 2019-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by Werner Lemberg diff --git a/builds/cmake/iOS.cmake b/builds/cmake/iOS.cmake index 7aba7c523..92097ef7a 100644 --- a/builds/cmake/iOS.cmake +++ b/builds/cmake/iOS.cmake @@ -1,6 +1,6 @@ # iOS.cmake # -# Copyright (C) 2014-2023 by +# Copyright (C) 2014-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by David Wimsey diff --git a/builds/cmake/testbuild.sh b/builds/cmake/testbuild.sh index 007170b04..eba97a17d 100755 --- a/builds/cmake/testbuild.sh +++ b/builds/cmake/testbuild.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -# Copyright (C) 2015-2023 by +# Copyright (C) 2015-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/ansi-cc.mk b/builds/compiler/ansi-cc.mk index f8386f615..ccb79c5e7 100644 --- a/builds/compiler/ansi-cc.mk +++ b/builds/compiler/ansi-cc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/bcc-dev.mk b/builds/compiler/bcc-dev.mk index d01ed7cd8..bade0e624 100644 --- a/builds/compiler/bcc-dev.mk +++ b/builds/compiler/bcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/bcc.mk b/builds/compiler/bcc.mk index a484bbaa7..120380485 100644 --- a/builds/compiler/bcc.mk +++ b/builds/compiler/bcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/emx.mk b/builds/compiler/emx.mk index 34d06b205..3d5573b4e 100644 --- a/builds/compiler/emx.mk +++ b/builds/compiler/emx.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2023 by +# Copyright (C) 2003-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/gcc-dev.mk b/builds/compiler/gcc-dev.mk index a6ded52cf..e7121bec7 100644 --- a/builds/compiler/gcc-dev.mk +++ b/builds/compiler/gcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/gcc.mk b/builds/compiler/gcc.mk index 20ca9698c..6916cacf1 100644 --- a/builds/compiler/gcc.mk +++ b/builds/compiler/gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/intelc.mk b/builds/compiler/intelc.mk index 1f7249355..64a6a681e 100644 --- a/builds/compiler/intelc.mk +++ b/builds/compiler/intelc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/unix-lcc.mk b/builds/compiler/unix-lcc.mk index af11d1778..66248d6fc 100644 --- a/builds/compiler/unix-lcc.mk +++ b/builds/compiler/unix-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/visualage.mk b/builds/compiler/visualage.mk index 75e9023d3..e0fca45e3 100644 --- a/builds/compiler/visualage.mk +++ b/builds/compiler/visualage.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/visualc.mk b/builds/compiler/visualc.mk index 30b03fc46..9eda2a029 100644 --- a/builds/compiler/visualc.mk +++ b/builds/compiler/visualc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/watcom.mk b/builds/compiler/watcom.mk index 61f8cd76f..16fd877ec 100644 --- a/builds/compiler/watcom.mk +++ b/builds/compiler/watcom.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/win-lcc.mk b/builds/compiler/win-lcc.mk index 92f653e43..1511da52f 100644 --- a/builds/compiler/win-lcc.mk +++ b/builds/compiler/win-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/detect.mk b/builds/detect.mk index d5cddb09a..de42b8e62 100644 --- a/builds/detect.mk +++ b/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk index 8ed148bde..93cc7194f 100644 --- a/builds/dos/detect.mk +++ b/builds/dos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-def.mk b/builds/dos/dos-def.mk index 37cb2c138..1b04bf945 100644 --- a/builds/dos/dos-def.mk +++ b/builds/dos/dos-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-emx.mk b/builds/dos/dos-emx.mk index 23181d774..c58931ad5 100644 --- a/builds/dos/dos-emx.mk +++ b/builds/dos/dos-emx.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2023 by +# Copyright (C) 2003-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-gcc.mk b/builds/dos/dos-gcc.mk index cd695dbac..a2822757e 100644 --- a/builds/dos/dos-gcc.mk +++ b/builds/dos/dos-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-wat.mk b/builds/dos/dos-wat.mk index a6b65cbf6..6f935def9 100644 --- a/builds/dos/dos-wat.mk +++ b/builds/dos/dos-wat.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2023 by +# Copyright (C) 2003-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/exports.mk b/builds/exports.mk index b10924a78..31da7c6d7 100644 --- a/builds/exports.mk +++ b/builds/exports.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2005-2023 by +# Copyright (C) 2005-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/freetype.mk b/builds/freetype.mk index b3fac80fd..feed7bd85 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/link_dos.mk b/builds/link_dos.mk index b3dc451f5..42df6dfa4 100644 --- a/builds/link_dos.mk +++ b/builds/link_dos.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/link_std.mk b/builds/link_std.mk index aca8ec49f..48fe09723 100644 --- a/builds/link_std.mk +++ b/builds/link_std.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c index 8fe556593..4e4ace33f 100644 --- a/builds/mac/ftmac.c +++ b/builds/mac/ftmac.c @@ -5,7 +5,7 @@ /* Mac FOND support. Written by just@letterror.com. */ /* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ /* */ -/* Copyright (C) 1996-2023 by */ +/* Copyright (C) 1996-2024 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/meson/extract_freetype_version.py b/builds/meson/extract_freetype_version.py index c4c60e7f1..c46ba3623 100644 --- a/builds/meson/extract_freetype_version.py +++ b/builds/meson/extract_freetype_version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/meson/extract_libtool_version.py b/builds/meson/extract_libtool_version.py index 6fac74c8e..8a25fcd68 100644 --- a/builds/meson/extract_libtool_version.py +++ b/builds/meson/extract_libtool_version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/meson/generate_reference_docs.py b/builds/meson/generate_reference_docs.py index 4208bb677..553405710 100644 --- a/builds/meson/generate_reference_docs.py +++ b/builds/meson/generate_reference_docs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/meson/parse_modules_cfg.py b/builds/meson/parse_modules_cfg.py index d48129fe7..f56a5db7f 100644 --- a/builds/meson/parse_modules_cfg.py +++ b/builds/meson/parse_modules_cfg.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/meson/process_ftoption_h.py b/builds/meson/process_ftoption_h.py index 98daa8c1e..cfb9d09a7 100644 --- a/builds/meson/process_ftoption_h.py +++ b/builds/meson/process_ftoption_h.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/modules.mk b/builds/modules.mk index a75baaf24..f98e93171 100644 --- a/builds/modules.mk +++ b/builds/modules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/detect.mk b/builds/os2/detect.mk index afdba7405..d4667b208 100644 --- a/builds/os2/detect.mk +++ b/builds/os2/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/os2-def.mk b/builds/os2/os2-def.mk index 917ef2d0e..160ca1ba2 100644 --- a/builds/os2/os2-def.mk +++ b/builds/os2/os2-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/os2-dev.mk b/builds/os2/os2-dev.mk index 3584fb6be..9f401de4b 100644 --- a/builds/os2/os2-dev.mk +++ b/builds/os2/os2-dev.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/os2-gcc.mk b/builds/os2/os2-gcc.mk index e17c5be6f..fd6f2ec92 100644 --- a/builds/os2/os2-gcc.mk +++ b/builds/os2/os2-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/symbian/bld.inf b/builds/symbian/bld.inf index 61689225a..f2e67ffed 100644 --- a/builds/symbian/bld.inf +++ b/builds/symbian/bld.inf @@ -2,7 +2,7 @@ // FreeType 2 project for the symbian platform // -// Copyright (C) 2008-2023 by +// Copyright (C) 2008-2024 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/symbian/freetype.mmp b/builds/symbian/freetype.mmp index 297678ede..ee948f0ab 100644 --- a/builds/symbian/freetype.mmp +++ b/builds/symbian/freetype.mmp @@ -2,7 +2,7 @@ // FreeType 2 makefile for the symbian platform // -// Copyright (C) 2008-2023 by +// Copyright (C) 2008-2024 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/toplevel.mk b/builds/toplevel.mk index ce7cc9c7f..4b7b148c5 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index dc7426ee0..b3e056d55 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright (C) 2001-2023 by +# Copyright (C) 2001-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk index 6b87013d5..28e6b74ec 100644 --- a/builds/unix/detect.mk +++ b/builds/unix/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in index 58561126f..f9fd1cb80 100644 --- a/builds/unix/freetype-config.in +++ b/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 2000-2023 by +# Copyright (C) 2000-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4 index 09ead4304..7fbda6b1f 100644 --- a/builds/unix/freetype2.m4 +++ b/builds/unix/freetype2.m4 @@ -1,7 +1,7 @@ # Configure paths for FreeType2 # Marcelo Magallon 2001-10-26, based on `gtk.m4` by Owen Taylor # -# Copyright (C) 2001-2023 by +# Copyright (C) 2001-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/ft-munmap.m4 b/builds/unix/ft-munmap.m4 index a0fcf3580..d398736a9 100644 --- a/builds/unix/ft-munmap.m4 +++ b/builds/unix/ft-munmap.m4 @@ -1,6 +1,6 @@ ## FreeType specific autoconf tests # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/ftconfig.h.in b/builds/unix/ftconfig.h.in index 3dac56126..da0d22ca4 100644 --- a/builds/unix/ftconfig.h.in +++ b/builds/unix/ftconfig.h.in @@ -4,7 +4,7 @@ * * UNIX-specific configuration file (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index 5927215df..42895e8f5 100644 --- a/builds/unix/ftsystem.c +++ b/builds/unix/ftsystem.c @@ -4,7 +4,7 @@ * * Unix-specific FreeType low-level system interface (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/unix/install.mk b/builds/unix/install.mk index 2f1729b71..e1d374a0c 100644 --- a/builds/unix/install.mk +++ b/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in index 802016dda..aafad2f97 100644 --- a/builds/unix/unix-cc.in +++ b/builds/unix/unix-cc.in @@ -2,7 +2,7 @@ # FreeType 2 template for Unix-specific compiler definitions # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in index d50994f3c..451880e4f 100644 --- a/builds/unix/unix-def.in +++ b/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix-dev.mk b/builds/unix/unix-dev.mk index 9dd8ad6ae..6603a5126 100644 --- a/builds/unix/unix-dev.mk +++ b/builds/unix/unix-dev.mk @@ -6,7 +6,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix-lcc.mk b/builds/unix/unix-lcc.mk index ded24f486..7b3dd9dd8 100644 --- a/builds/unix/unix-lcc.mk +++ b/builds/unix/unix-lcc.mk @@ -6,7 +6,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk index 3505175b5..a8b62db13 100644 --- a/builds/unix/unix.mk +++ b/builds/unix/unix.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unixddef.mk b/builds/unix/unixddef.mk index 71973471d..17f6b0ee5 100644 --- a/builds/unix/unixddef.mk +++ b/builds/unix/unixddef.mk @@ -4,7 +4,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h index 31dfcecbd..d96543411 100644 --- a/builds/vms/ftconfig.h +++ b/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ * * VMS-specific configuration file (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c index 0afd07d91..a61e8ea20 100644 --- a/builds/vms/ftsystem.c +++ b/builds/vms/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* VMS-specific FreeType low-level system interface (body). */ /* */ -/* Copyright (C) 1996-2023 by */ +/* Copyright (C) 1996-2024 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/wince/ftdebug.c b/builds/wince/ftdebug.c index 6453f8d23..2e9a1dcdb 100644 --- a/builds/wince/ftdebug.c +++ b/builds/wince/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for WinCE (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/windows/detect.mk b/builds/windows/detect.mk index d7908bee5..e452eaac9 100644 --- a/builds/windows/detect.mk +++ b/builds/windows/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/ftdebug.c b/builds/windows/ftdebug.c index 360f8c7e3..2c6996763 100644 --- a/builds/windows/ftdebug.c +++ b/builds/windows/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for Win32 (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/windows/ftsystem.c b/builds/windows/ftsystem.c index 418d7995e..3a56834f6 100644 --- a/builds/windows/ftsystem.c +++ b/builds/windows/ftsystem.c @@ -4,7 +4,7 @@ * * Windows-specific FreeType low-level system interface (body). * - * Copyright (C) 2021-2023 by + * Copyright (C) 2021-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/builds/windows/w32-bcc.mk b/builds/windows/w32-bcc.mk index e7cf668df..a68656fc9 100644 --- a/builds/windows/w32-bcc.mk +++ b/builds/windows/w32-bcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-bccd.mk b/builds/windows/w32-bccd.mk index 64dafdb94..484aefc05 100644 --- a/builds/windows/w32-bccd.mk +++ b/builds/windows/w32-bccd.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-dev.mk b/builds/windows/w32-dev.mk index 7c89ad2a2..6ae6d9fa6 100644 --- a/builds/windows/w32-dev.mk +++ b/builds/windows/w32-dev.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-gcc.mk b/builds/windows/w32-gcc.mk index f37c185f5..f1dace5b5 100644 --- a/builds/windows/w32-gcc.mk +++ b/builds/windows/w32-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-icc.mk b/builds/windows/w32-icc.mk index cf51ccead..e331c5dbe 100644 --- a/builds/windows/w32-icc.mk +++ b/builds/windows/w32-icc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-intl.mk b/builds/windows/w32-intl.mk index 0c16b4c84..440b48d86 100644 --- a/builds/windows/w32-intl.mk +++ b/builds/windows/w32-intl.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-lcc.mk b/builds/windows/w32-lcc.mk index 0dd740e25..d34bcd529 100644 --- a/builds/windows/w32-lcc.mk +++ b/builds/windows/w32-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-mingw32.mk b/builds/windows/w32-mingw32.mk index dc323bd34..c5b19f7d8 100644 --- a/builds/windows/w32-mingw32.mk +++ b/builds/windows/w32-mingw32.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-vcc.mk b/builds/windows/w32-vcc.mk index eea7db8b5..bfba2adac 100644 --- a/builds/windows/w32-vcc.mk +++ b/builds/windows/w32-vcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-wat.mk b/builds/windows/w32-wat.mk index 5392d2a4b..665ef49b9 100644 --- a/builds/windows/w32-wat.mk +++ b/builds/windows/w32-wat.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/win32-def.mk b/builds/windows/win32-def.mk index 324265132..af4e8b575 100644 --- a/builds/windows/win32-def.mk +++ b/builds/windows/win32-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/configure b/configure index d4315bd97..f4049dbca 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/devel/ft2build.h b/devel/ft2build.h index 82fdb30f6..7e5260d63 100644 --- a/devel/ft2build.h +++ b/devel/ft2build.h @@ -4,7 +4,7 @@ * * FreeType 2 build and setup macros (development version). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/devel/ftoption.h b/devel/ftoption.h index 7b702d444..caa450955 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -4,7 +4,7 @@ * * User-selectable configuration macros (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/docs/CHANGES b/docs/CHANGES index 7ccfcad99..cbf3cc93a 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -5694,7 +5694,7 @@ Extensions support: ------------------------------------------------------------------------ -Copyright (C) 2000-2023 by +Copyright (C) 2000-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/CUSTOMIZE b/docs/CUSTOMIZE index 80527db7e..a96726e4f 100644 --- a/docs/CUSTOMIZE +++ b/docs/CUSTOMIZE @@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers ---------------------------------------------------------------------- -Copyright (C) 2003-2023 by +Copyright (C) 2003-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/DEBUG b/docs/DEBUG index 7398df69b..c892d4180 100644 --- a/docs/DEBUG +++ b/docs/DEBUG @@ -297,7 +297,7 @@ to access them. ------------------------------------------------------------------------ -Copyright (C) 2002-2023 by +Copyright (C) 2002-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/DOCGUIDE b/docs/DOCGUIDE index b46b7bd54..332b93691 100644 --- a/docs/DOCGUIDE +++ b/docs/DOCGUIDE @@ -285,7 +285,7 @@ is converted to ---------------------------------------------------------------------- -Copyright (C) 2018-2023 by +Copyright (C) 2018-2024 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL b/docs/INSTALL index 1795ca3c2..0ab2a5e9e 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -101,7 +101,7 @@ III. Custom builds of the library ---------------------------------------------------------------------- -Copyright (C) 2000-2023 by +Copyright (C) 2000-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.ANY b/docs/INSTALL.ANY index 7cfe1feb9..32ee707a1 100644 --- a/docs/INSTALL.ANY +++ b/docs/INSTALL.ANY @@ -144,7 +144,7 @@ II. Support for flat-directory compilation ---------------------------------------------------------------------- -Copyright (C) 2003-2023 by +Copyright (C) 2003-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS index 21f4c3182..b774527e5 100644 --- a/docs/INSTALL.CROSS +++ b/docs/INSTALL.CROSS @@ -163,7 +163,7 @@ procedure. ---------------------------------------------------------------------- -Copyright (C) 2006-2023 by +Copyright (C) 2006-2024 by suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg. diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU index 7517d9c7c..57f201832 100644 --- a/docs/INSTALL.GNU +++ b/docs/INSTALL.GNU @@ -168,7 +168,7 @@ instructions in the file `INSTALL.UNIX' instead. ---------------------------------------------------------------------- -Copyright (C) 2003-2023 by +Copyright (C) 2003-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX index 659f3a21f..4a4a101e3 100644 --- a/docs/INSTALL.UNIX +++ b/docs/INSTALL.UNIX @@ -126,7 +126,7 @@ or MSys on Win32: ---------------------------------------------------------------------- -Copyright (C) 2003-2023 by +Copyright (C) 2003-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.VMS b/docs/INSTALL.VMS index 4f8c3ac33..ba5aece89 100644 --- a/docs/INSTALL.VMS +++ b/docs/INSTALL.VMS @@ -56,7 +56,7 @@ Orginal version of the build procedures was created by ------------------------------------------------------------------------ -Copyright (C) 2000-2023 by +Copyright (C) 2000-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/TODO b/docs/TODO index d340880d2..985e363cc 100644 --- a/docs/TODO +++ b/docs/TODO @@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType. ------------------------------------------------------------------------ -Copyright (C) 2001-2023 by +Copyright (C) 2001-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/VERSIONS.TXT b/docs/VERSIONS.TXT index 8b43c1583..62481cb7f 100644 --- a/docs/VERSIONS.TXT +++ b/docs/VERSIONS.TXT @@ -124,7 +124,7 @@ other release numbers. ---------------------------------------------------------------------- -Copyright (C) 2002-2023 by +Copyright (C) 2002-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/formats.txt b/docs/formats.txt index 882d62d23..00283e6a0 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -206,7 +206,7 @@ which isn't supported yet please send a mail too. ------------------------------------------------------------------------ -Copyright (C) 2004-2023 by +Copyright (C) 2004-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/oldlogs/ChangeLog.20 b/docs/oldlogs/ChangeLog.20 index 09937286e..c2e2e1d6c 100644 --- a/docs/oldlogs/ChangeLog.20 +++ b/docs/oldlogs/ChangeLog.20 @@ -2597,7 +2597,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2000-2023 by +Copyright (C) 2000-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.21 b/docs/oldlogs/ChangeLog.21 index b331257b7..0c2e0fbad 100644 --- a/docs/oldlogs/ChangeLog.21 +++ b/docs/oldlogs/ChangeLog.21 @@ -9422,7 +9422,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2002-2023 by +Copyright (C) 2002-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.210 b/docs/oldlogs/ChangeLog.210 index adb23d5dd..3cf9ea961 100644 --- a/docs/oldlogs/ChangeLog.210 +++ b/docs/oldlogs/ChangeLog.210 @@ -7799,7 +7799,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2018-2023 by +Copyright (C) 2018-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.22 b/docs/oldlogs/ChangeLog.22 index b06d6451e..f3c659809 100644 --- a/docs/oldlogs/ChangeLog.22 +++ b/docs/oldlogs/ChangeLog.22 @@ -2821,7 +2821,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2005-2023 by +Copyright (C) 2005-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.23 b/docs/oldlogs/ChangeLog.23 index a8a69dd20..84271757b 100644 --- a/docs/oldlogs/ChangeLog.23 +++ b/docs/oldlogs/ChangeLog.23 @@ -7932,7 +7932,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2006-2023 by +Copyright (C) 2006-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.24 b/docs/oldlogs/ChangeLog.24 index 0dbb2ac78..2258ecc7c 100644 --- a/docs/oldlogs/ChangeLog.24 +++ b/docs/oldlogs/ChangeLog.24 @@ -6344,7 +6344,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2010-2023 by +Copyright (C) 2010-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.25 b/docs/oldlogs/ChangeLog.25 index 31d511117..008c4e729 100644 --- a/docs/oldlogs/ChangeLog.25 +++ b/docs/oldlogs/ChangeLog.25 @@ -5145,7 +5145,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2013-2023 by +Copyright (C) 2013-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.26 b/docs/oldlogs/ChangeLog.26 index 528345e86..157957daa 100644 --- a/docs/oldlogs/ChangeLog.26 +++ b/docs/oldlogs/ChangeLog.26 @@ -5695,7 +5695,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2015-2023 by +Copyright (C) 2015-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.27 b/docs/oldlogs/ChangeLog.27 index 6510e4564..69cda8014 100644 --- a/docs/oldlogs/ChangeLog.27 +++ b/docs/oldlogs/ChangeLog.27 @@ -2090,7 +2090,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2016-2023 by +Copyright (C) 2016-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.28 b/docs/oldlogs/ChangeLog.28 index 603fc61b1..d810a1b0b 100644 --- a/docs/oldlogs/ChangeLog.28 +++ b/docs/oldlogs/ChangeLog.28 @@ -3120,7 +3120,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2016-2023 by +Copyright (C) 2016-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/oldlogs/ChangeLog.29 b/docs/oldlogs/ChangeLog.29 index 3d73d4722..3c6efa792 100644 --- a/docs/oldlogs/ChangeLog.29 +++ b/docs/oldlogs/ChangeLog.29 @@ -2336,7 +2336,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2017-2023 by +Copyright (C) 2017-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/docs/raster.txt b/docs/raster.txt index 1642a81d9..d85b662c2 100644 --- a/docs/raster.txt +++ b/docs/raster.txt @@ -618,7 +618,7 @@ II. Rendering Technology ------------------------------------------------------------------------ -Copyright (C) 2003-2023 by +Copyright (C) 2003-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/release b/docs/release index fa0ea486a..90ceb8688 100644 --- a/docs/release +++ b/docs/release @@ -211,7 +211,7 @@ How to prepare a new release ---------------------------------------------------------------------- -Copyright (C) 2003-2023 by +Copyright (C) 2003-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h index a85151699..0667493fe 100644 --- a/include/freetype/config/ftconfig.h +++ b/include/freetype/config/ftconfig.h @@ -4,7 +4,7 @@ * * ANSI-specific configuration file (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h index e607bce15..f6ef2618d 100644 --- a/include/freetype/config/ftheader.h +++ b/include/freetype/config/ftheader.h @@ -4,7 +4,7 @@ * * Build macros of the FreeType 2 library. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h index 415f3d379..eb4e32d80 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -4,7 +4,7 @@ * * User-selectable configuration macros (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h index f65148a90..e17aa7b89 100644 --- a/include/freetype/config/ftstdlib.h +++ b/include/freetype/config/ftstdlib.h @@ -5,7 +5,7 @@ * ANSI-specific library and header configuration file (specification * only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/integer-types.h b/include/freetype/config/integer-types.h index 7258b5085..c27505ffc 100644 --- a/include/freetype/config/integer-types.h +++ b/include/freetype/config/integer-types.h @@ -4,7 +4,7 @@ * * FreeType integer types definitions. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/mac-support.h b/include/freetype/config/mac-support.h index b77b96d5d..07b6f915b 100644 --- a/include/freetype/config/mac-support.h +++ b/include/freetype/config/mac-support.h @@ -4,7 +4,7 @@ * * Mac/OS X support configuration header. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/public-macros.h b/include/freetype/config/public-macros.h index 23d0fa6a3..f56581a6e 100644 --- a/include/freetype/config/public-macros.h +++ b/include/freetype/config/public-macros.h @@ -4,7 +4,7 @@ * * Define a set of compiler macros used in public FreeType headers. * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 9632fbc21..e3a0435ba 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -4,7 +4,7 @@ * * FreeType high-level API and common types (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftadvanc.h b/include/freetype/ftadvanc.h index 4560ded6d..85b8ba255 100644 --- a/include/freetype/ftadvanc.h +++ b/include/freetype/ftadvanc.h @@ -4,7 +4,7 @@ * * Quick computation of advance widths (specification only). * - * Copyright (C) 2008-2023 by + * Copyright (C) 2008-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftbbox.h b/include/freetype/ftbbox.h index fc21740fc..12bbfa63a 100644 --- a/include/freetype/ftbbox.h +++ b/include/freetype/ftbbox.h @@ -4,7 +4,7 @@ * * FreeType exact bbox computation (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftbdf.h b/include/freetype/ftbdf.h index e8ce64312..6f63b0b1e 100644 --- a/include/freetype/ftbdf.h +++ b/include/freetype/ftbdf.h @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftbitmap.h b/include/freetype/ftbitmap.h index eb6b4b1ee..df9d46265 100644 --- a/include/freetype/ftbitmap.h +++ b/include/freetype/ftbitmap.h @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftbzip2.h b/include/freetype/ftbzip2.h index 7d29f4682..c5baea856 100644 --- a/include/freetype/ftbzip2.h +++ b/include/freetype/ftbzip2.h @@ -4,7 +4,7 @@ * * Bzip2-compressed stream support. * - * Copyright (C) 2010-2023 by + * Copyright (C) 2010-2024 by * Joel Klinghed. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h index a2072e26b..140df4c96 100644 --- a/include/freetype/ftcache.h +++ b/include/freetype/ftcache.h @@ -4,7 +4,7 @@ * * FreeType Cache subsystem (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftcid.h b/include/freetype/ftcid.h index ef2293902..96b2a90fc 100644 --- a/include/freetype/ftcid.h +++ b/include/freetype/ftcid.h @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information (specification). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * Dereg Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h index eae200fdf..420720ddf 100644 --- a/include/freetype/ftcolor.h +++ b/include/freetype/ftcolor.h @@ -4,7 +4,7 @@ * * FreeType's glyph color management (specification). * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h index 7af7465bc..baf15a460 100644 --- a/include/freetype/ftdriver.h +++ b/include/freetype/ftdriver.h @@ -4,7 +4,7 @@ * * FreeType API for controlling driver modules (specification only). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/fterrdef.h b/include/freetype/fterrdef.h index d59b3cc2d..710ca91bb 100644 --- a/include/freetype/fterrdef.h +++ b/include/freetype/fterrdef.h @@ -4,7 +4,7 @@ * * FreeType error codes (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/fterrors.h b/include/freetype/fterrors.h index 15ef3f76b..27c0ece5c 100644 --- a/include/freetype/fterrors.h +++ b/include/freetype/fterrors.h @@ -4,7 +4,7 @@ * * FreeType error code handling (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftfntfmt.h b/include/freetype/ftfntfmt.h index c0018fc83..7c8b0874a 100644 --- a/include/freetype/ftfntfmt.h +++ b/include/freetype/ftfntfmt.h @@ -4,7 +4,7 @@ * * Support functions for font formats. * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftgasp.h b/include/freetype/ftgasp.h index d5f19add8..30e5a9bf8 100644 --- a/include/freetype/ftgasp.h +++ b/include/freetype/ftgasp.h @@ -4,7 +4,7 @@ * * Access of TrueType's 'gasp' table (specification). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h index 4658895f7..dc1eb8873 100644 --- a/include/freetype/ftglyph.h +++ b/include/freetype/ftglyph.h @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftgxval.h b/include/freetype/ftgxval.h index e8de9a6ed..065cd53cc 100644 --- a/include/freetype/ftgxval.h +++ b/include/freetype/ftgxval.h @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Masatake YAMATO, Redhat K.K, * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/include/freetype/ftgzip.h b/include/freetype/ftgzip.h index 443ec29db..9516dc030 100644 --- a/include/freetype/ftgzip.h +++ b/include/freetype/ftgzip.h @@ -4,7 +4,7 @@ * * Gzip-compressed stream support. * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 637a761f0..9d7f6b77d 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -5,7 +5,7 @@ * FreeType glyph image formats and default raster interface * (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftincrem.h b/include/freetype/ftincrem.h index 2d4f5def2..816581b78 100644 --- a/include/freetype/ftincrem.h +++ b/include/freetype/ftincrem.h @@ -4,7 +4,7 @@ * * FreeType incremental loading (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftlcdfil.h b/include/freetype/ftlcdfil.h index d3723e16f..25274dc4a 100644 --- a/include/freetype/ftlcdfil.h +++ b/include/freetype/ftlcdfil.h @@ -5,7 +5,7 @@ * FreeType API for color filtering of subpixel bitmap glyphs * (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftlist.h b/include/freetype/ftlist.h index b55313133..972fbfa2f 100644 --- a/include/freetype/ftlist.h +++ b/include/freetype/ftlist.h @@ -4,7 +4,7 @@ * * Generic list support for FreeType (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftlogging.h b/include/freetype/ftlogging.h index 53b8b8964..1813cfc2c 100644 --- a/include/freetype/ftlogging.h +++ b/include/freetype/ftlogging.h @@ -4,7 +4,7 @@ * * Additional debugging APIs. * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftlzw.h b/include/freetype/ftlzw.h index adfd17247..bcf59ba70 100644 --- a/include/freetype/ftlzw.h +++ b/include/freetype/ftlzw.h @@ -4,7 +4,7 @@ * * LZW-compressed stream support. * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftmac.h b/include/freetype/ftmac.h index a91e38f9e..e4efde33d 100644 --- a/include/freetype/ftmac.h +++ b/include/freetype/ftmac.h @@ -4,7 +4,7 @@ * * Additional Mac-specific API. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h index d145128a9..a6e3e34fb 100644 --- a/include/freetype/ftmm.h +++ b/include/freetype/ftmm.h @@ -4,7 +4,7 @@ * * FreeType Multiple Master font interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h index c8f0c2c2a..0ee715898 100644 --- a/include/freetype/ftmodapi.h +++ b/include/freetype/ftmodapi.h @@ -4,7 +4,7 @@ * * FreeType modules public interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftmoderr.h b/include/freetype/ftmoderr.h index c8c892dcc..6722fbf8b 100644 --- a/include/freetype/ftmoderr.h +++ b/include/freetype/ftmoderr.h @@ -4,7 +4,7 @@ * * FreeType module error offsets (specification). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftotval.h b/include/freetype/ftotval.h index 011bdfc83..810200b38 100644 --- a/include/freetype/ftotval.h +++ b/include/freetype/ftotval.h @@ -4,7 +4,7 @@ * * FreeType API for validating OpenType tables (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h index f2fa8e6e0..44e94b4f5 100644 --- a/include/freetype/ftoutln.h +++ b/include/freetype/ftoutln.h @@ -5,7 +5,7 @@ * Support for the FT_Outline type used to store glyph shapes of * most scalable font formats (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftparams.h b/include/freetype/ftparams.h index 6a9f243bc..43bf69c20 100644 --- a/include/freetype/ftparams.h +++ b/include/freetype/ftparams.h @@ -4,7 +4,7 @@ * * FreeType API for possible FT_Parameter tags (specification only). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftpfr.h b/include/freetype/ftpfr.h index 7111d40a0..1a712b955 100644 --- a/include/freetype/ftpfr.h +++ b/include/freetype/ftpfr.h @@ -4,7 +4,7 @@ * * FreeType API for accessing PFR-specific data (specification only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h index 0b6fad32e..dc5018a1b 100644 --- a/include/freetype/ftrender.h +++ b/include/freetype/ftrender.h @@ -4,7 +4,7 @@ * * FreeType renderer modules public interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftsizes.h b/include/freetype/ftsizes.h index 7bfb1aed4..4ef5c7955 100644 --- a/include/freetype/ftsizes.h +++ b/include/freetype/ftsizes.h @@ -4,7 +4,7 @@ * * FreeType size objects management (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftsnames.h b/include/freetype/ftsnames.h index 9d5d22bb2..d5d5cd931 100644 --- a/include/freetype/ftsnames.h +++ b/include/freetype/ftsnames.h @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftstroke.h b/include/freetype/ftstroke.h index b3d90802a..41626dc9d 100644 --- a/include/freetype/ftstroke.h +++ b/include/freetype/ftstroke.h @@ -4,7 +4,7 @@ * * FreeType path stroker (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftsynth.h b/include/freetype/ftsynth.h index af90967dd..43081b6c3 100644 --- a/include/freetype/ftsynth.h +++ b/include/freetype/ftsynth.h @@ -5,7 +5,7 @@ * FreeType synthesizing code for emboldening and slanting * (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftsystem.h b/include/freetype/ftsystem.h index 3a08f4912..1eacb3af3 100644 --- a/include/freetype/ftsystem.h +++ b/include/freetype/ftsystem.h @@ -4,7 +4,7 @@ * * FreeType low-level system interface definition (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/fttrigon.h b/include/freetype/fttrigon.h index 294981a6f..a5299e938 100644 --- a/include/freetype/fttrigon.h +++ b/include/freetype/fttrigon.h @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (specification). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h index 5b109f0c7..27815143a 100644 --- a/include/freetype/fttypes.h +++ b/include/freetype/fttypes.h @@ -4,7 +4,7 @@ * * FreeType simple types definitions (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ftwinfnt.h b/include/freetype/ftwinfnt.h index 7b701ea59..2591e5886 100644 --- a/include/freetype/ftwinfnt.h +++ b/include/freetype/ftwinfnt.h @@ -4,7 +4,7 @@ * * FreeType API for accessing Windows fnt-specific data. * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h index bf9c8b7cf..8865d53b3 100644 --- a/include/freetype/internal/autohint.h +++ b/include/freetype/internal/autohint.h @@ -4,7 +4,7 @@ * * High-level 'autohint' module-specific interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/cffotypes.h b/include/freetype/internal/cffotypes.h index 50d535384..36b0390a5 100644 --- a/include/freetype/internal/cffotypes.h +++ b/include/freetype/internal/cffotypes.h @@ -4,7 +4,7 @@ * * Basic OpenType/CFF object type definitions (specification). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/cfftypes.h b/include/freetype/internal/cfftypes.h index af9f5bc6b..ef2e8e756 100644 --- a/include/freetype/internal/cfftypes.h +++ b/include/freetype/internal/cfftypes.h @@ -5,7 +5,7 @@ * Basic OpenType/CFF type definitions and interface (specification * only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/compiler-macros.h b/include/freetype/internal/compiler-macros.h index 6f6765097..876f66e25 100644 --- a/include/freetype/internal/compiler-macros.h +++ b/include/freetype/internal/compiler-macros.h @@ -4,7 +4,7 @@ * * Compiler-specific macro definitions used internally by FreeType. * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index 11b76fe5e..40634602f 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -4,7 +4,7 @@ * * Arithmetic computations (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h index 4e013ba1e..d7fa8dc93 100644 --- a/include/freetype/internal/ftdebug.h +++ b/include/freetype/internal/ftdebug.h @@ -4,7 +4,7 @@ * * Debugging and logging component (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftdrv.h b/include/freetype/internal/ftdrv.h index 9001c07ad..5609b3ef1 100644 --- a/include/freetype/internal/ftdrv.h +++ b/include/freetype/internal/ftdrv.h @@ -4,7 +4,7 @@ * * FreeType internal font driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftgloadr.h b/include/freetype/internal/ftgloadr.h index 36e5509f9..f1c155b16 100644 --- a/include/freetype/internal/ftgloadr.h +++ b/include/freetype/internal/ftgloadr.h @@ -4,7 +4,7 @@ * * The FreeType glyph loader (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h index 5eb1d21ff..202cd0a7f 100644 --- a/include/freetype/internal/ftmemory.h +++ b/include/freetype/internal/ftmemory.h @@ -4,7 +4,7 @@ * * The FreeType memory management macros (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftmmtypes.h b/include/freetype/internal/ftmmtypes.h index c4b21d614..8449e7a01 100644 --- a/include/freetype/internal/ftmmtypes.h +++ b/include/freetype/internal/ftmmtypes.h @@ -5,7 +5,7 @@ * OpenType Variations type definitions for internal use * with the multi-masters service (specification). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and * Dominik Röttsches. * diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index 28bc9b65f..e6333c2aa 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -4,7 +4,7 @@ * * The FreeType private base classes (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftpsprop.h b/include/freetype/internal/ftpsprop.h index 1d5b287ad..4f11aa16b 100644 --- a/include/freetype/internal/ftpsprop.h +++ b/include/freetype/internal/ftpsprop.h @@ -4,7 +4,7 @@ * * Get and set properties of PostScript drivers (specification). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftrfork.h b/include/freetype/internal/ftrfork.h index e96459921..05c1d6c48 100644 --- a/include/freetype/internal/ftrfork.h +++ b/include/freetype/internal/ftrfork.h @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Masatake YAMATO and Redhat K.K. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftserv.h b/include/freetype/internal/ftserv.h index 1e85d6d38..8c35dbd71 100644 --- a/include/freetype/internal/ftserv.h +++ b/include/freetype/internal/ftserv.h @@ -4,7 +4,7 @@ * * The FreeType services (specification only). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h index 88e19287c..fd52f767e 100644 --- a/include/freetype/internal/ftstream.h +++ b/include/freetype/internal/ftstream.h @@ -4,7 +4,7 @@ * * Stream handling (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/fttrace.h b/include/freetype/internal/fttrace.h index f97446956..42595a29f 100644 --- a/include/freetype/internal/fttrace.h +++ b/include/freetype/internal/fttrace.h @@ -4,7 +4,7 @@ * * Tracing handling (specification only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/ftvalid.h b/include/freetype/internal/ftvalid.h index e98ee4e47..a1312f2ab 100644 --- a/include/freetype/internal/ftvalid.h +++ b/include/freetype/internal/ftvalid.h @@ -4,7 +4,7 @@ * * FreeType validation support (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index 76cbebdba..41f481d5a 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -5,7 +5,7 @@ * Auxiliary functions and data structures related to PostScript fonts * (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/pshints.h b/include/freetype/internal/pshints.h index ededc4c72..dba6c7303 100644 --- a/include/freetype/internal/pshints.h +++ b/include/freetype/internal/pshints.h @@ -6,7 +6,7 @@ * recorders (specification only). These are used to support native * T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers. * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svbdf.h b/include/freetype/internal/services/svbdf.h index bf0c1dcc7..89e9c2e5d 100644 --- a/include/freetype/internal/services/svbdf.h +++ b/include/freetype/internal/services/svbdf.h @@ -4,7 +4,7 @@ * * The FreeType BDF services (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svcfftl.h b/include/freetype/internal/services/svcfftl.h index 4a20498ee..3cb483c34 100644 --- a/include/freetype/internal/services/svcfftl.h +++ b/include/freetype/internal/services/svcfftl.h @@ -4,7 +4,7 @@ * * The FreeType CFF tables loader service (specification). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svcid.h b/include/freetype/internal/services/svcid.h index 06d0cb8fd..8362cb872 100644 --- a/include/freetype/internal/services/svcid.h +++ b/include/freetype/internal/services/svcid.h @@ -4,7 +4,7 @@ * * The FreeType CID font services (specification). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svfntfmt.h b/include/freetype/internal/services/svfntfmt.h index bc45e8056..6b837e79f 100644 --- a/include/freetype/internal/services/svfntfmt.h +++ b/include/freetype/internal/services/svfntfmt.h @@ -4,7 +4,7 @@ * * The FreeType font format service (specification only). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svgldict.h b/include/freetype/internal/services/svgldict.h index 6437abfbf..6126ec9ad 100644 --- a/include/freetype/internal/services/svgldict.h +++ b/include/freetype/internal/services/svgldict.h @@ -4,7 +4,7 @@ * * The FreeType glyph dictionary services (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svgxval.h b/include/freetype/internal/services/svgxval.h index 31016afe0..29cf55281 100644 --- a/include/freetype/internal/services/svgxval.h +++ b/include/freetype/internal/services/svgxval.h @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/include/freetype/internal/services/svkern.h b/include/freetype/internal/services/svkern.h index bcabbc3e6..ac1bc30c4 100644 --- a/include/freetype/internal/services/svkern.h +++ b/include/freetype/internal/services/svkern.h @@ -4,7 +4,7 @@ * * The FreeType Kerning service (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svmetric.h b/include/freetype/internal/services/svmetric.h index 167617ebb..8b3563b25 100644 --- a/include/freetype/internal/services/svmetric.h +++ b/include/freetype/internal/services/svmetric.h @@ -4,7 +4,7 @@ * * The FreeType services for metrics variations (specification). * - * Copyright (C) 2016-2023 by + * Copyright (C) 2016-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svmm.h b/include/freetype/internal/services/svmm.h index 7e76ab832..5288fadf3 100644 --- a/include/freetype/internal/services/svmm.h +++ b/include/freetype/internal/services/svmm.h @@ -4,7 +4,7 @@ * * The FreeType Multiple Masters and GX var services (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svotval.h b/include/freetype/internal/services/svotval.h index a4683cd5f..7aea7ec11 100644 --- a/include/freetype/internal/services/svotval.h +++ b/include/freetype/internal/services/svotval.h @@ -4,7 +4,7 @@ * * The FreeType OpenType validation service (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svpfr.h b/include/freetype/internal/services/svpfr.h index fd189c7de..b2fac6d08 100644 --- a/include/freetype/internal/services/svpfr.h +++ b/include/freetype/internal/services/svpfr.h @@ -4,7 +4,7 @@ * * Internal PFR service functions (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svpostnm.h b/include/freetype/internal/services/svpostnm.h index 2b8f6dfec..d19f3adc6 100644 --- a/include/freetype/internal/services/svpostnm.h +++ b/include/freetype/internal/services/svpostnm.h @@ -4,7 +4,7 @@ * * The FreeType PostScript name services (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svprop.h b/include/freetype/internal/services/svprop.h index 932ce32e0..ba39c0dd4 100644 --- a/include/freetype/internal/services/svprop.h +++ b/include/freetype/internal/services/svprop.h @@ -4,7 +4,7 @@ * * The FreeType property service (specification). * - * Copyright (C) 2012-2023 by + * Copyright (C) 2012-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svpscmap.h b/include/freetype/internal/services/svpscmap.h index 6e599f3aa..d4908ee41 100644 --- a/include/freetype/internal/services/svpscmap.h +++ b/include/freetype/internal/services/svpscmap.h @@ -4,7 +4,7 @@ * * The FreeType PostScript charmap service (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svpsinfo.h b/include/freetype/internal/services/svpsinfo.h index 09c4cdccc..2aadcdd02 100644 --- a/include/freetype/internal/services/svpsinfo.h +++ b/include/freetype/internal/services/svpsinfo.h @@ -4,7 +4,7 @@ * * The FreeType PostScript info service (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svsfnt.h b/include/freetype/internal/services/svsfnt.h index f98df2ef5..9e0f4ff20 100644 --- a/include/freetype/internal/services/svsfnt.h +++ b/include/freetype/internal/services/svsfnt.h @@ -4,7 +4,7 @@ * * The FreeType SFNT table loading service (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svttcmap.h b/include/freetype/internal/services/svttcmap.h index 5f9eb02d6..250886bcc 100644 --- a/include/freetype/internal/services/svttcmap.h +++ b/include/freetype/internal/services/svttcmap.h @@ -4,7 +4,7 @@ * * The FreeType TrueType/sfnt cmap extra information service. * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * Masatake YAMATO, Redhat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/include/freetype/internal/services/svtteng.h b/include/freetype/internal/services/svtteng.h index ad577cb29..14967529a 100644 --- a/include/freetype/internal/services/svtteng.h +++ b/include/freetype/internal/services/svtteng.h @@ -4,7 +4,7 @@ * * The FreeType TrueType engine query service (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svttglyf.h b/include/freetype/internal/services/svttglyf.h index ca6fff744..f190b3985 100644 --- a/include/freetype/internal/services/svttglyf.h +++ b/include/freetype/internal/services/svttglyf.h @@ -4,7 +4,7 @@ * * The FreeType TrueType glyph service. * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/services/svwinfnt.h b/include/freetype/internal/services/svwinfnt.h index 002923f8c..49f3fb7f7 100644 --- a/include/freetype/internal/services/svwinfnt.h +++ b/include/freetype/internal/services/svwinfnt.h @@ -4,7 +4,7 @@ * * The FreeType Windows FNT/FONT service (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h index 5cbc32b25..35e4e73af 100644 --- a/include/freetype/internal/sfnt.h +++ b/include/freetype/internal/sfnt.h @@ -4,7 +4,7 @@ * * High-level 'sfnt' driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/svginterface.h b/include/freetype/internal/svginterface.h index f464b2c05..68c99efb1 100644 --- a/include/freetype/internal/svginterface.h +++ b/include/freetype/internal/svginterface.h @@ -4,7 +4,7 @@ * * Interface of ot-svg module (specification only). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h index b9c94398f..be63e4dcf 100644 --- a/include/freetype/internal/t1types.h +++ b/include/freetype/internal/t1types.h @@ -5,7 +5,7 @@ * Basic Type1/Type2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index ccc29887e..44a0165cc 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/freetype/internal/tttypes.h @@ -5,7 +5,7 @@ * Basic SFNT/TrueType type definitions and interface (specification * only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/internal/wofftypes.h b/include/freetype/internal/wofftypes.h index 0c1d8eeaf..4a169d12f 100644 --- a/include/freetype/internal/wofftypes.h +++ b/include/freetype/internal/wofftypes.h @@ -5,7 +5,7 @@ * Basic WOFF/WOFF2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/otsvg.h b/include/freetype/otsvg.h index bfe9a6ab7..9d356938c 100644 --- a/include/freetype/otsvg.h +++ b/include/freetype/otsvg.h @@ -4,7 +4,7 @@ * * Interface for OT-SVG support related things (specification). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h index 1aecfbbd9..8a1b10593 100644 --- a/include/freetype/t1tables.h +++ b/include/freetype/t1tables.h @@ -5,7 +5,7 @@ * Basic Type 1/Type 2 tables definitions and interface (specification * only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/ttnameid.h b/include/freetype/ttnameid.h index e31c68b9b..d5d470e38 100644 --- a/include/freetype/ttnameid.h +++ b/include/freetype/ttnameid.h @@ -4,7 +4,7 @@ * * TrueType name ID definitions (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h index a9f60e762..111f21802 100644 --- a/include/freetype/tttables.h +++ b/include/freetype/tttables.h @@ -5,7 +5,7 @@ * Basic SFNT/TrueType tables definitions and interface * (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/tttags.h b/include/freetype/tttags.h index 9bf4fca23..da0af5d3f 100644 --- a/include/freetype/tttags.h +++ b/include/freetype/tttags.h @@ -4,7 +4,7 @@ * * Tags for TrueType and OpenType tables (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/include/ft2build.h b/include/ft2build.h index 58491ceea..d3d768503 100644 --- a/include/ft2build.h +++ b/include/ft2build.h @@ -4,7 +4,7 @@ * * FreeType 2 build and setup macros. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/meson.build b/meson.build index f81de3e2f..2939e288b 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ # Meson project file for FreeType 2 # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/meson_options.txt b/meson_options.txt index e4ad50ca7..ce035b98d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,7 +2,7 @@ # meson_options.txt # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/modules.cfg b/modules.cfg index 5b6c9b5a5..948d219bb 100644 --- a/modules.cfg +++ b/modules.cfg @@ -1,6 +1,6 @@ # modules.cfg # -# Copyright (C) 2005-2023 by +# Copyright (C) 2005-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c index d7655b9b9..ea83969cd 100644 --- a/src/autofit/afblue.c +++ b/src/autofit/afblue.c @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afblue.cin b/src/autofit/afblue.cin index d561c5093..d2270fac7 100644 --- a/src/autofit/afblue.cin +++ b/src/autofit/afblue.cin @@ -4,7 +4,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat index 8299baa25..88bab2632 100644 --- a/src/autofit/afblue.dat +++ b/src/autofit/afblue.dat @@ -2,7 +2,7 @@ // // Auto-fitter data for blue strings. // -// Copyright (C) 2013-2023 by +// Copyright (C) 2013-2024 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h index 76f2f47cb..2aa9d0984 100644 --- a/src/autofit/afblue.h +++ b/src/autofit/afblue.h @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afblue.hin b/src/autofit/afblue.hin index 6a31298e6..38031505a 100644 --- a/src/autofit/afblue.hin +++ b/src/autofit/afblue.hin @@ -4,7 +4,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c index f414289ad..869b60487 100644 --- a/src/autofit/afcjk.c +++ b/src/autofit/afcjk.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (body). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h index 20dad4d72..bc5aaf12e 100644 --- a/src/autofit/afcjk.h +++ b/src/autofit/afcjk.h @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afcover.h b/src/autofit/afcover.h index 102ed4278..7980cf2e9 100644 --- a/src/autofit/afcover.h +++ b/src/autofit/afcover.h @@ -4,7 +4,7 @@ * * Auto-fitter coverages (specification only). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c index a4629b528..ad667d2ed 100644 --- a/src/autofit/afdummy.c +++ b/src/autofit/afdummy.c @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afdummy.h b/src/autofit/afdummy.h index a7af3f62c..613c2f88a 100644 --- a/src/autofit/afdummy.h +++ b/src/autofit/afdummy.h @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/aferrors.h b/src/autofit/aferrors.h index 88faf05c9..ae584ff06 100644 --- a/src/autofit/aferrors.h +++ b/src/autofit/aferrors.h @@ -4,7 +4,7 @@ * * Autofitter error codes (specification only). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index b1957570f..b7403fa65 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -4,7 +4,7 @@ * * Auto-fitter routines to compute global hinting values (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h index 66170e419..ddb54c89b 100644 --- a/src/autofit/afglobal.h +++ b/src/autofit/afglobal.h @@ -5,7 +5,7 @@ * Auto-fitter routines to compute global hinting values * (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index e4a378fbf..27d7bc1a9 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h index d1cf9529b..76fe83006 100644 --- a/src/autofit/afhints.h +++ b/src/autofit/afhints.h @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c index 7fb12c63d..c6d23efd8 100644 --- a/src/autofit/afindic.c +++ b/src/autofit/afindic.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for Indic writing system (body). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * Rahul Bhalerao , . * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afindic.h b/src/autofit/afindic.h index 3eb67f63b..a7f73f251 100644 --- a/src/autofit/afindic.h +++ b/src/autofit/afindic.h @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for Indic writing system * (specification). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * Rahul Bhalerao , . * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 80b1ad7d6..316e7c676 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for latin writing system (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h index 22435d5a0..54e506150 100644 --- a/src/autofit/aflatin.h +++ b/src/autofit/aflatin.h @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for latin writing system * (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 7c47d562a..af1d59a68 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h index e4e197e37..99f0e15f9 100644 --- a/src/autofit/afloader.h +++ b/src/autofit/afloader.h @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c index 20a6b96bc..8b0123b3e 100644 --- a/src/autofit/afmodule.c +++ b/src/autofit/afmodule.c @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afmodule.h b/src/autofit/afmodule.h index 4b8b4562c..91a1abfef 100644 --- a/src/autofit/afmodule.h +++ b/src/autofit/afmodule.h @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (specification). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c index cfcaf340a..007b43281 100644 --- a/src/autofit/afranges.c +++ b/src/autofit/afranges.c @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (body). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h index 5775738bc..813b3ee78 100644 --- a/src/autofit/afranges.h +++ b/src/autofit/afranges.h @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (specification). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h index 3a101937d..0a83d7715 100644 --- a/src/autofit/afscript.h +++ b/src/autofit/afscript.h @@ -4,7 +4,7 @@ * * Auto-fitter scripts (specification only). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afshaper.c b/src/autofit/afshaper.c index abc6f1d29..df0f46ada 100644 --- a/src/autofit/afshaper.c +++ b/src/autofit/afshaper.c @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (body). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afshaper.h b/src/autofit/afshaper.h index 054a18ffb..2eb03bb5d 100644 --- a/src/autofit/afshaper.h +++ b/src/autofit/afshaper.h @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (specification). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h index 73ebef017..7a33f37a8 100644 --- a/src/autofit/afstyles.h +++ b/src/autofit/afstyles.h @@ -4,7 +4,7 @@ * * Auto-fitter styles (specification only). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h index 661519449..27e4185e9 100644 --- a/src/autofit/aftypes.h +++ b/src/autofit/aftypes.h @@ -4,7 +4,7 @@ * * Auto-fitter types (specification only). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afws-decl.h b/src/autofit/afws-decl.h index 48c888afe..b78745af7 100644 --- a/src/autofit/afws-decl.h +++ b/src/autofit/afws-decl.h @@ -4,7 +4,7 @@ * * Auto-fitter writing system declarations (specification only). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/afws-iter.h b/src/autofit/afws-iter.h index a0a686f8c..c86d609a3 100644 --- a/src/autofit/afws-iter.h +++ b/src/autofit/afws-iter.h @@ -4,7 +4,7 @@ * * Auto-fitter writing systems iterator (specification only). * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c index 8bd609b5e..de5ec7c7c 100644 --- a/src/autofit/autofit.c +++ b/src/autofit/autofit.c @@ -4,7 +4,7 @@ * * Auto-fitter module (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/autofit/module.mk b/src/autofit/module.mk index 95cb20ad2..dd6b40715 100644 --- a/src/autofit/module.mk +++ b/src/autofit/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2023 by +# Copyright (C) 2003-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/autofit/rules.mk b/src/autofit/rules.mk index a46ba3f0f..682046f47 100644 --- a/src/autofit/rules.mk +++ b/src/autofit/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2023 by +# Copyright (C) 2003-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/base/ftadvanc.c b/src/base/ftadvanc.c index de25476fe..717f7d08b 100644 --- a/src/base/ftadvanc.c +++ b/src/base/ftadvanc.c @@ -4,7 +4,7 @@ * * Quick computation of advance widths (body). * - * Copyright (C) 2008-2023 by + * Copyright (C) 2008-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftbase.c b/src/base/ftbase.c index 156510f00..50805ccec 100644 --- a/src/base/ftbase.c +++ b/src/base/ftbase.c @@ -4,7 +4,7 @@ * * Single object library component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftbase.h b/src/base/ftbase.h index 00790d3b2..1d98b26dd 100644 --- a/src/base/ftbase.h +++ b/src/base/ftbase.h @@ -4,7 +4,7 @@ * * Private functions used in the `base' module (specification). * - * Copyright (C) 2008-2023 by + * Copyright (C) 2008-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index 385fea404..e98c29fc7 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -4,7 +4,7 @@ * * FreeType bbox computation (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/src/base/ftbdf.c b/src/base/ftbdf.c index f697c00fe..d8e9fd7ea 100644 --- a/src/base/ftbdf.c +++ b/src/base/ftbdf.c @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c index 1c93648dc..4be145679 100644 --- a/src/base/ftbitmap.c +++ b/src/base/ftbitmap.c @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index 1ee2e8096..5851dae16 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -4,7 +4,7 @@ * * Arithmetic computations (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftcid.c b/src/base/ftcid.c index 866cd23e9..4f2deb19a 100644 --- a/src/base/ftcid.c +++ b/src/base/ftcid.c @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information. * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftcolor.c b/src/base/ftcolor.c index bcd6e893d..c6bf2a3cd 100644 --- a/src/base/ftcolor.c +++ b/src/base/ftcolor.c @@ -4,7 +4,7 @@ * * FreeType's glyph color management (body). * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c index 8fab50dd0..902a5dc8b 100644 --- a/src/base/ftdbgmem.c +++ b/src/base/ftdbgmem.c @@ -4,7 +4,7 @@ * * Memory debugger (body). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c index 61c4563b0..11307eaac 100644 --- a/src/base/ftdebug.c +++ b/src/base/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/fterrors.c b/src/base/fterrors.c index 5ad9709c8..61041a37c 100644 --- a/src/base/fterrors.c +++ b/src/base/fterrors.c @@ -4,7 +4,7 @@ * * FreeType API for error code handling. * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * Armin Hasitzka, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftfntfmt.c b/src/base/ftfntfmt.c index 0b41f7cc8..77b4089e7 100644 --- a/src/base/ftfntfmt.c +++ b/src/base/ftfntfmt.c @@ -4,7 +4,7 @@ * * FreeType utility file for font formats (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftfstype.c b/src/base/ftfstype.c index ea24e64c6..1565c3b7e 100644 --- a/src/base/ftfstype.c +++ b/src/base/ftfstype.c @@ -4,7 +4,7 @@ * * FreeType utility file to access FSType data (body). * - * Copyright (C) 2008-2023 by + * Copyright (C) 2008-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftgasp.c b/src/base/ftgasp.c index 29b7b08b7..c63d30e97 100644 --- a/src/base/ftgasp.c +++ b/src/base/ftgasp.c @@ -4,7 +4,7 @@ * * Access of TrueType's `gasp' table (body). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c index 9823d09e4..e0c107f47 100644 --- a/src/base/ftgloadr.c +++ b/src/base/ftgloadr.c @@ -4,7 +4,7 @@ * * The FreeType glyph loader (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c index 393d4949f..1b5849f99 100644 --- a/src/base/ftglyph.c +++ b/src/base/ftglyph.c @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftgxval.c b/src/base/ftgxval.c index 6b3c5d248..6e38cb5ba 100644 --- a/src/base/ftgxval.c +++ b/src/base/ftgxval.c @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Masatake YAMATO, Redhat K.K, * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/base/ftinit.c b/src/base/ftinit.c index c9c71d24b..9a6c00e13 100644 --- a/src/base/ftinit.c +++ b/src/base/ftinit.c @@ -4,7 +4,7 @@ * * FreeType initialization layer (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c index 6c3fd66e0..1e69d4da7 100644 --- a/src/base/ftlcdfil.c +++ b/src/base/ftlcdfil.c @@ -4,7 +4,7 @@ * * FreeType API for color filtering of subpixel bitmap glyphs (body). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftmac.c b/src/base/ftmac.c index cc54391b7..e8e35627b 100644 --- a/src/base/ftmac.c +++ b/src/base/ftmac.c @@ -8,7 +8,7 @@ * This file is for Mac OS X only; see builds/mac/ftoldmac.c for * classic platforms built by MPW. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftmm.c b/src/base/ftmm.c index 9e2dd7ee7..cc4ca22fb 100644 --- a/src/base/ftmm.c +++ b/src/base/ftmm.c @@ -4,7 +4,7 @@ * * Multiple Master font support (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 71a976c26..9b97820c3 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4,7 +4,7 @@ * * The FreeType private base classes (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftotval.c b/src/base/ftotval.c index 192e12a71..aed9eef34 100644 --- a/src/base/ftotval.c +++ b/src/base/ftotval.c @@ -4,7 +4,7 @@ * * FreeType API for validating OpenType tables (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index 134f39d2b..c7564dbd3 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -4,7 +4,7 @@ * * FreeType outline management (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftpatent.c b/src/base/ftpatent.c index cb5efadff..2055757e0 100644 --- a/src/base/ftpatent.c +++ b/src/base/ftpatent.c @@ -5,7 +5,7 @@ * FreeType API for checking patented TrueType bytecode instructions * (body). Obsolete, retained for backward compatibility. * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftpfr.c b/src/base/ftpfr.c index 378385a59..0caa9d1d5 100644 --- a/src/base/ftpfr.c +++ b/src/base/ftpfr.c @@ -4,7 +4,7 @@ * * FreeType API for accessing PFR-specific data (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftpsprop.c b/src/base/ftpsprop.c index cefdf489d..37a6cee6c 100644 --- a/src/base/ftpsprop.c +++ b/src/base/ftpsprop.c @@ -5,7 +5,7 @@ * Get and set properties of PostScript drivers (body). * See `ftdriver.h' for available properties. * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c index 2ab430195..dc9b043d8 100644 --- a/src/base/ftrfork.c +++ b/src/base/ftrfork.c @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Masatake YAMATO and Redhat K.K. * * FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are diff --git a/src/base/ftsnames.c b/src/base/ftsnames.c index 1917a3f1d..f7231fd61 100644 --- a/src/base/ftsnames.c +++ b/src/base/ftsnames.c @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftstream.c b/src/base/ftstream.c index 80ba6cd5e..41fd913be 100644 --- a/src/base/ftstream.c +++ b/src/base/ftstream.c @@ -4,7 +4,7 @@ * * I/O stream support (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c index 92f1e4308..443b48aaf 100644 --- a/src/base/ftstroke.c +++ b/src/base/ftstroke.c @@ -4,7 +4,7 @@ * * FreeType path stroker (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index f32edd338..ec05bce33 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -4,7 +4,7 @@ * * FreeType synthesizing code for emboldening and slanting (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c index 61c99e363..eee364233 100644 --- a/src/base/ftsystem.c +++ b/src/base/ftsystem.c @@ -4,7 +4,7 @@ * * ANSI-specific FreeType low-level system interface (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c index 2dd2c3459..4b1aced1c 100644 --- a/src/base/fttrigon.c +++ b/src/base/fttrigon.c @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (body). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/fttype1.c b/src/base/fttype1.c index 637c5cf77..cedf7c405 100644 --- a/src/base/fttype1.c +++ b/src/base/fttype1.c @@ -4,7 +4,7 @@ * * FreeType utility file for PS names support (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftutil.c b/src/base/ftutil.c index 6120846d2..b13512f87 100644 --- a/src/base/ftutil.c +++ b/src/base/ftutil.c @@ -4,7 +4,7 @@ * * FreeType utility file for memory and list management (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/ftver.rc b/src/base/ftver.rc index 137a6334b..62490c063 100644 --- a/src/base/ftver.rc +++ b/src/base/ftver.rc @@ -4,7 +4,7 @@ /* */ /* FreeType VERSIONINFO resource for Windows DLLs. */ /* */ -/* Copyright (C) 2018-2023 by */ +/* Copyright (C) 2018-2024 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/base/ftwinfnt.c b/src/base/ftwinfnt.c index 03b023e07..e849a15f4 100644 --- a/src/base/ftwinfnt.c +++ b/src/base/ftwinfnt.c @@ -4,7 +4,7 @@ * * FreeType API for accessing Windows FNT specific info (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/base/rules.mk b/src/base/rules.mk index b7de9b5ca..042c0755e 100644 --- a/src/base/rules.mk +++ b/src/base/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/bzip2/ftbzip2.c b/src/bzip2/ftbzip2.c index ad342bd01..a0249eb8d 100644 --- a/src/bzip2/ftbzip2.c +++ b/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ * parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2010-2023 by + * Copyright (C) 2010-2024 by * Joel Klinghed. * * based on `src/gzip/ftgzip.c' diff --git a/src/bzip2/rules.mk b/src/bzip2/rules.mk index f4d3733eb..9019eee14 100644 --- a/src/bzip2/rules.mk +++ b/src/bzip2/rules.mk @@ -2,7 +2,7 @@ # FreeType 2 BZIP2 support configuration rules # -# Copyright (C) 2010-2023 by +# Copyright (C) 2010-2024 by # Joel Klinghed. # # based on `src/lzw/rules.mk' diff --git a/src/cache/ftcache.c b/src/cache/ftcache.c index 1af2e6772..81e0347af 100644 --- a/src/cache/ftcache.c +++ b/src/cache/ftcache.c @@ -4,7 +4,7 @@ * * The FreeType Caching sub-system (body only). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 24a56c8d2..b6e13fd7b 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ * * The FreeType basic cache interface (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c index e0698557b..33a03486d 100644 --- a/src/cache/ftccache.c +++ b/src/cache/ftccache.c @@ -4,7 +4,7 @@ * * The FreeType internal cache interface (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h index 850d2554b..ccbf97980 100644 --- a/src/cache/ftccache.h +++ b/src/cache/ftccache.h @@ -4,7 +4,7 @@ * * FreeType internal cache interface (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h index 5f9db213a..79ba44ab9 100644 --- a/src/cache/ftccback.h +++ b/src/cache/ftccback.h @@ -4,7 +4,7 @@ * * Callback functions of the caching sub-system (specification only). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c index 84f22a667..43c507361 100644 --- a/src/cache/ftccmap.c +++ b/src/cache/ftccmap.c @@ -4,7 +4,7 @@ * * FreeType CharMap cache (body) * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcerror.h b/src/cache/ftcerror.h index dc1a62013..daabcc612 100644 --- a/src/cache/ftcerror.h +++ b/src/cache/ftcerror.h @@ -4,7 +4,7 @@ * * Caching sub-system error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c index d344733f3..cf7820abd 100644 --- a/src/cache/ftcglyph.c +++ b/src/cache/ftcglyph.c @@ -4,7 +4,7 @@ * * FreeType Glyph Image (FT_Glyph) cache (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcglyph.h b/src/cache/ftcglyph.h index 0181e9816..66a1bc77e 100644 --- a/src/cache/ftcglyph.h +++ b/src/cache/ftcglyph.h @@ -4,7 +4,7 @@ * * FreeType abstract glyph cache (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index 428e5e1a7..56ff80915 100644 --- a/src/cache/ftcimage.c +++ b/src/cache/ftcimage.c @@ -4,7 +4,7 @@ * * FreeType Image cache (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcimage.h b/src/cache/ftcimage.h index d2a807f15..a0c4a9725 100644 --- a/src/cache/ftcimage.h +++ b/src/cache/ftcimage.h @@ -4,7 +4,7 @@ * * FreeType Generic Image cache (specification) * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index 94f8469c9..dd9bb6190 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -4,7 +4,7 @@ * * FreeType Cache Manager (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcmanag.h b/src/cache/ftcmanag.h index 5b30929c9..bd158f5ff 100644 --- a/src/cache/ftcmanag.h +++ b/src/cache/ftcmanag.h @@ -4,7 +4,7 @@ * * FreeType Cache Manager (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c index ad10a06bc..7171d4d20 100644 --- a/src/cache/ftcmru.c +++ b/src/cache/ftcmru.c @@ -4,7 +4,7 @@ * * FreeType MRU support (body). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h index 45e5249ca..abafea3ae 100644 --- a/src/cache/ftcmru.h +++ b/src/cache/ftcmru.h @@ -4,7 +4,7 @@ * * Simple MRU list-cache (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index 9929a0bcc..c8548744b 100644 --- a/src/cache/ftcsbits.c +++ b/src/cache/ftcsbits.c @@ -4,7 +4,7 @@ * * FreeType sbits manager (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/ftcsbits.h b/src/cache/ftcsbits.h index e833cb5c3..d7c4a3647 100644 --- a/src/cache/ftcsbits.h +++ b/src/cache/ftcsbits.h @@ -4,7 +4,7 @@ * * A small-bitmap cache (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cache/rules.mk b/src/cache/rules.mk index 82b39aa33..ace92c59f 100644 --- a/src/cache/rules.mk +++ b/src/cache/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2000-2023 by +# Copyright (C) 2000-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/cff/cff.c b/src/cff/cff.c index b486c389e..e3e009699 100644 --- a/src/cff/cff.c +++ b/src/cff/cff.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c index 10d287bc8..ea5f8ed28 100644 --- a/src/cff/cffcmap.c +++ b/src/cff/cffcmap.c @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffcmap.h b/src/cff/cffcmap.h index b2afc2fab..1dd8700cd 100644 --- a/src/cff/cffcmap.h +++ b/src/cff/cffcmap.h @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index 9898d625c..f6ebdb381 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -4,7 +4,7 @@ * * OpenType font driver implementation (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffdrivr.h b/src/cff/cffdrivr.h index ab1f147bb..fd5bc37ec 100644 --- a/src/cff/cffdrivr.h +++ b/src/cff/cffdrivr.h @@ -4,7 +4,7 @@ * * High-level OpenType driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cfferrs.h b/src/cff/cfferrs.h index bc9a3043f..128adc3b7 100644 --- a/src/cff/cfferrs.h +++ b/src/cff/cfferrs.h @@ -4,7 +4,7 @@ * * CFF error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index c483d1d1a..cbb071abd 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h index 3b8cf236d..346d4b11c 100644 --- a/src/cff/cffgload.h +++ b/src/cff/cffgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffload.c b/src/cff/cffload.c index feea55fcf..a23fa4d12 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -4,7 +4,7 @@ * * OpenType and CFF data/program tables loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffload.h b/src/cff/cffload.h index b5286b0c8..022092454 100644 --- a/src/cff/cffload.h +++ b/src/cff/cffload.h @@ -4,7 +4,7 @@ * * OpenType & CFF data/program tables loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index 9169a03e2..7764a7edd 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -4,7 +4,7 @@ * * OpenType objects manager (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h index 8f05f6132..91ad83b1c 100644 --- a/src/cff/cffobjs.h +++ b/src/cff/cffobjs.h @@ -4,7 +4,7 @@ * * OpenType objects manager (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c index 138cd6543..92a69c3b5 100644 --- a/src/cff/cffparse.c +++ b/src/cff/cffparse.c @@ -4,7 +4,7 @@ * * CFF token stream parser (body) * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cffparse.h b/src/cff/cffparse.h index 4c683f2f0..ca6b18af6 100644 --- a/src/cff/cffparse.h +++ b/src/cff/cffparse.h @@ -4,7 +4,7 @@ * * CFF token stream parser (specification) * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/cfftoken.h b/src/cff/cfftoken.h index b038c7a24..da45faa7f 100644 --- a/src/cff/cfftoken.h +++ b/src/cff/cfftoken.h @@ -4,7 +4,7 @@ * * CFF token definitions (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cff/module.mk b/src/cff/module.mk index b881d049f..2c89cc62b 100644 --- a/src/cff/module.mk +++ b/src/cff/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/cff/rules.mk b/src/cff/rules.mk index 629424adf..8d4d6457b 100644 --- a/src/cff/rules.mk +++ b/src/cff/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/cid/ciderrs.h b/src/cid/ciderrs.h index 40a1097d0..c439a8c4a 100644 --- a/src/cid/ciderrs.h +++ b/src/cid/ciderrs.h @@ -4,7 +4,7 @@ * * CID error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c index eaca765ad..7b571322d 100644 --- a/src/cid/cidgload.c +++ b/src/cid/cidgload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 Glyph Loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidgload.h b/src/cid/cidgload.h index edd622923..9fdc9db58 100644 --- a/src/cid/cidgload.h +++ b/src/cid/cidgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidload.c b/src/cid/cidload.c index 7984a45f9..722f5a34d 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidload.h b/src/cid/cidload.h index d12d2962a..7f030b32d 100644 --- a/src/cid/cidload.h +++ b/src/cid/cidload.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c index f698a4192..8d337c411 100644 --- a/src/cid/cidobjs.c +++ b/src/cid/cidobjs.c @@ -4,7 +4,7 @@ * * CID objects manager (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidobjs.h b/src/cid/cidobjs.h index 83c0c61c3..d371cbe99 100644 --- a/src/cid/cidobjs.h +++ b/src/cid/cidobjs.h @@ -4,7 +4,7 @@ * * CID objects manager (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c index 171a88621..1e7c9d2bf 100644 --- a/src/cid/cidparse.c +++ b/src/cid/cidparse.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidparse.h b/src/cid/cidparse.h index 2fd4e7a93..0f5baddcb 100644 --- a/src/cid/cidparse.h +++ b/src/cid/cidparse.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c index 99e7b1183..4be8a5c00 100644 --- a/src/cid/cidriver.c +++ b/src/cid/cidriver.c @@ -4,7 +4,7 @@ * * CID driver interface (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidriver.h b/src/cid/cidriver.h index a6249385c..7ddce431c 100644 --- a/src/cid/cidriver.h +++ b/src/cid/cidriver.h @@ -4,7 +4,7 @@ * * High-level CID driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/cidtoken.h b/src/cid/cidtoken.h index 925951acd..160897d14 100644 --- a/src/cid/cidtoken.h +++ b/src/cid/cidtoken.h @@ -4,7 +4,7 @@ * * CID token definitions (specification only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/cid/module.mk b/src/cid/module.mk index 563cb3489..c65a69fba 100644 --- a/src/cid/module.mk +++ b/src/cid/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/cid/rules.mk b/src/cid/rules.mk index c526ad38d..85ac737a4 100644 --- a/src/cid/rules.mk +++ b/src/cid/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/cid/type1cid.c b/src/cid/type1cid.c index 905c896a3..890a3ac54 100644 --- a/src/cid/type1cid.c +++ b/src/cid/type1cid.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/dlg/dlgwrap.c b/src/dlg/dlgwrap.c index e9dc3410a..e6053cd5b 100644 --- a/src/dlg/dlgwrap.c +++ b/src/dlg/dlgwrap.c @@ -4,7 +4,7 @@ * * Wrapper file for the 'dlg' library (body only) * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/dlg/rules.mk b/src/dlg/rules.mk index 7f506fd35..14953636a 100644 --- a/src/dlg/rules.mk +++ b/src/dlg/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/gxvalid/README b/src/gxvalid/README index 0e3db322e..efd792c9a 100644 --- a/src/gxvalid/README +++ b/src/gxvalid/README @@ -518,7 +518,7 @@ gxvalid: TrueType GX validator ------------------------------------------------------------------------ -Copyright (C) 2004-2023 by +Copyright (C) 2004-2024 by suzuki toshiya, Masatake YAMATO, Red hat K.K., David Turner, Robert Wilhelm, and Werner Lemberg. diff --git a/src/gxvalid/gxvalid.c b/src/gxvalid/gxvalid.c index e0359f4df..6694c342c 100644 --- a/src/gxvalid/gxvalid.c +++ b/src/gxvalid/gxvalid.c @@ -4,7 +4,7 @@ * * FreeType validator for TrueTypeGX/AAT tables (body only). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvalid.h b/src/gxvalid/gxvalid.h index a83408b41..4ddb625e9 100644 --- a/src/gxvalid/gxvalid.h +++ b/src/gxvalid/gxvalid.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT table validation (specification only). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvbsln.c b/src/gxvalid/gxvbsln.c index 030a64ee4..e3a922aeb 100644 --- a/src/gxvalid/gxvbsln.c +++ b/src/gxvalid/gxvbsln.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT bsln table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c index 7f908742a..5f8fa115f 100644 --- a/src/gxvalid/gxvcommn.c +++ b/src/gxvalid/gxvcommn.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common tables validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h index 52cb6c408..4dbac1db6 100644 --- a/src/gxvalid/gxvcommn.h +++ b/src/gxvalid/gxvcommn.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common tables validation (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxverror.h b/src/gxvalid/gxverror.h index 09311ed3c..750f22fc3 100644 --- a/src/gxvalid/gxverror.h +++ b/src/gxvalid/gxverror.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT validation module error codes (specification only). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvfeat.c b/src/gxvalid/gxvfeat.c index 6cf18212a..57b389239 100644 --- a/src/gxvalid/gxvfeat.c +++ b/src/gxvalid/gxvfeat.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT feat table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvfeat.h b/src/gxvalid/gxvfeat.h index b33c1bc68..dd8f1bfe6 100644 --- a/src/gxvalid/gxvfeat.h +++ b/src/gxvalid/gxvfeat.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT feat table validation (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvfgen.c b/src/gxvalid/gxvfgen.c index cf98bb36c..27a4ed9a7 100644 --- a/src/gxvalid/gxvfgen.c +++ b/src/gxvalid/gxvfgen.c @@ -5,7 +5,7 @@ * Generate feature registry data for gxv `feat' validator. * This program is derived from gxfeatreg.c in gxlayout. * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Masatake YAMATO and Redhat K.K. * * This file may only be used, diff --git a/src/gxvalid/gxvjust.c b/src/gxvalid/gxvjust.c index 5cca94d8f..1cf9e84ad 100644 --- a/src/gxvalid/gxvjust.c +++ b/src/gxvalid/gxvjust.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT just table validation (body). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvkern.c b/src/gxvalid/gxvkern.c index 21fc24596..cf8c51fb8 100644 --- a/src/gxvalid/gxvkern.c +++ b/src/gxvalid/gxvkern.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT kern table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvlcar.c b/src/gxvalid/gxvlcar.c index 5f3bf8907..0b310f42d 100644 --- a/src/gxvalid/gxvlcar.c +++ b/src/gxvalid/gxvlcar.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT lcar table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmod.c b/src/gxvalid/gxvmod.c index 0b4115bbc..ce1e441eb 100644 --- a/src/gxvalid/gxvmod.c +++ b/src/gxvalid/gxvmod.c @@ -4,7 +4,7 @@ * * FreeType's TrueTypeGX/AAT validation module implementation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmod.h b/src/gxvalid/gxvmod.h index db3d1d9f5..6def5c547 100644 --- a/src/gxvalid/gxvmod.h +++ b/src/gxvalid/gxvmod.h @@ -5,7 +5,7 @@ * FreeType's TrueTypeGX/AAT validation module implementation * (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort.c b/src/gxvalid/gxvmort.c index 7032d6349..5ad9d81c5 100644 --- a/src/gxvalid/gxvmort.c +++ b/src/gxvalid/gxvmort.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT mort table validation (body). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort.h b/src/gxvalid/gxvmort.h index 5c819bdbc..a3970e786 100644 --- a/src/gxvalid/gxvmort.h +++ b/src/gxvalid/gxvmort.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common definition for mort table (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c index 24e70a0da..1a05a6d43 100644 --- a/src/gxvalid/gxvmort0.c +++ b/src/gxvalid/gxvmort0.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type0 (Indic Script Rearrangement) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort1.c b/src/gxvalid/gxvmort1.c index ea5591f98..f99a8a498 100644 --- a/src/gxvalid/gxvmort1.c +++ b/src/gxvalid/gxvmort1.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type1 (Contextual Substitution) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort2.c b/src/gxvalid/gxvmort2.c index 50644f06a..18c9be676 100644 --- a/src/gxvalid/gxvmort2.c +++ b/src/gxvalid/gxvmort2.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type2 (Ligature Substitution) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort4.c b/src/gxvalid/gxvmort4.c index 0641b1133..bc190fadd 100644 --- a/src/gxvalid/gxvmort4.c +++ b/src/gxvalid/gxvmort4.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type4 (Non-Contextual Glyph Substitution) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmort5.c b/src/gxvalid/gxvmort5.c index 9225bb0c6..8211a294a 100644 --- a/src/gxvalid/gxvmort5.c +++ b/src/gxvalid/gxvmort5.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type5 (Contextual Glyph Insertion) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx.c b/src/gxvalid/gxvmorx.c index 931bf006b..4e7a0d40a 100644 --- a/src/gxvalid/gxvmorx.c +++ b/src/gxvalid/gxvmorx.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT morx table validation (body). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx.h b/src/gxvalid/gxvmorx.h index 27572553d..7e20b5f96 100644 --- a/src/gxvalid/gxvmorx.h +++ b/src/gxvalid/gxvmorx.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common definition for morx table (specification). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx0.c b/src/gxvalid/gxvmorx0.c index 73523f363..bff850bac 100644 --- a/src/gxvalid/gxvmorx0.c +++ b/src/gxvalid/gxvmorx0.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type0 (Indic Script Rearrangement) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx1.c b/src/gxvalid/gxvmorx1.c index 71a201880..d8ded3bc4 100644 --- a/src/gxvalid/gxvmorx1.c +++ b/src/gxvalid/gxvmorx1.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type1 (Contextual Substitution) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx2.c b/src/gxvalid/gxvmorx2.c index 858c81143..faa09e902 100644 --- a/src/gxvalid/gxvmorx2.c +++ b/src/gxvalid/gxvmorx2.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type2 (Ligature Substitution) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx4.c b/src/gxvalid/gxvmorx4.c index c9ad19906..40468b849 100644 --- a/src/gxvalid/gxvmorx4.c +++ b/src/gxvalid/gxvmorx4.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c index 95fa4e288..a3dbdd43d 100644 --- a/src/gxvalid/gxvmorx5.c +++ b/src/gxvalid/gxvmorx5.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type5 (Contextual Glyph Insertion) subtable. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvopbd.c b/src/gxvalid/gxvopbd.c index 5e9a9665e..98b5bb875 100644 --- a/src/gxvalid/gxvopbd.c +++ b/src/gxvalid/gxvopbd.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT opbd table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvprop.c b/src/gxvalid/gxvprop.c index 63a052a8e..e485fa665 100644 --- a/src/gxvalid/gxvprop.c +++ b/src/gxvalid/gxvprop.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT prop table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/gxvtrak.c b/src/gxvalid/gxvtrak.c index f3fb51c8a..a402823af 100644 --- a/src/gxvalid/gxvtrak.c +++ b/src/gxvalid/gxvtrak.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT trak table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/src/gxvalid/module.mk b/src/gxvalid/module.mk index 49491348a..1d1df0044 100644 --- a/src/gxvalid/module.mk +++ b/src/gxvalid/module.mk @@ -2,7 +2,7 @@ # FreeType 2 gxvalid module definition # -# Copyright (C) 2004-2023 by +# Copyright (C) 2004-2024 by # suzuki toshiya, Masatake YAMATO, Red Hat K.K., # David Turner, Robert Wilhelm, and Werner Lemberg. # diff --git a/src/gxvalid/rules.mk b/src/gxvalid/rules.mk index 95ae6334e..0d8801083 100644 --- a/src/gxvalid/rules.mk +++ b/src/gxvalid/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2004-2023 by +# Copyright (C) 2004-2024 by # suzuki toshiya, Masatake YAMATO, Red Hat K.K., # David Turner, Robert Wilhelm, and Werner Lemberg. # diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c index ca6a2aabe..f77377ef9 100644 --- a/src/gzip/ftgzip.c +++ b/src/gzip/ftgzip.c @@ -8,7 +8,7 @@ * parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/gzip/rules.mk b/src/gzip/rules.mk index c76eacb1a..6b6c99008 100644 --- a/src/gzip/rules.mk +++ b/src/gzip/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c index 88383792a..e1acf22ee 100644 --- a/src/lzw/ftlzw.c +++ b/src/lzw/ftlzw.c @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * Albert Chin-A-Young. * * based on code in `src/gzip/ftgzip.c' diff --git a/src/lzw/ftzopen.c b/src/lzw/ftzopen.c index e680c4de5..e42332466 100644 --- a/src/lzw/ftzopen.c +++ b/src/lzw/ftzopen.c @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/src/lzw/ftzopen.h b/src/lzw/ftzopen.h index 6c7563643..691521829 100644 --- a/src/lzw/ftzopen.h +++ b/src/lzw/ftzopen.h @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/src/lzw/rules.mk b/src/lzw/rules.mk index b750216fb..d051fda5a 100644 --- a/src/lzw/rules.mk +++ b/src/lzw/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2004-2023 by +# Copyright (C) 2004-2024 by # Albert Chin-A-Young. # # based on `src/lzw/rules.mk' diff --git a/src/otvalid/module.mk b/src/otvalid/module.mk index 90138426e..b3ca83cf8 100644 --- a/src/otvalid/module.mk +++ b/src/otvalid/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2004-2023 by +# Copyright (C) 2004-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/otvalid/otvalid.c b/src/otvalid/otvalid.c index 3b1e23a6f..c96967ce6 100644 --- a/src/otvalid/otvalid.c +++ b/src/otvalid/otvalid.c @@ -4,7 +4,7 @@ * * FreeType validator for OpenType tables (body only). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvalid.h b/src/otvalid/otvalid.h index 7edadb771..0f46a7a1f 100644 --- a/src/otvalid/otvalid.h +++ b/src/otvalid/otvalid.h @@ -4,7 +4,7 @@ * * OpenType table validation (specification only). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvbase.c b/src/otvalid/otvbase.c index f449795f8..610126242 100644 --- a/src/otvalid/otvbase.c +++ b/src/otvalid/otvbase.c @@ -4,7 +4,7 @@ * * OpenType BASE table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c index b94d8a065..f06354b78 100644 --- a/src/otvalid/otvcommn.c +++ b/src/otvalid/otvcommn.c @@ -4,7 +4,7 @@ * * OpenType common tables validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h index 6702c0008..7db1a575d 100644 --- a/src/otvalid/otvcommn.h +++ b/src/otvalid/otvcommn.h @@ -4,7 +4,7 @@ * * OpenType common tables validation (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otverror.h b/src/otvalid/otverror.h index 4c4049ca5..7f4dd6eb6 100644 --- a/src/otvalid/otverror.h +++ b/src/otvalid/otverror.h @@ -4,7 +4,7 @@ * * OpenType validation module error codes (specification only). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvgdef.c b/src/otvalid/otvgdef.c index d62e8187f..e36cda754 100644 --- a/src/otvalid/otvgdef.c +++ b/src/otvalid/otvgdef.c @@ -4,7 +4,7 @@ * * OpenType GDEF table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c index f6102afbc..d7547a33e 100644 --- a/src/otvalid/otvgpos.c +++ b/src/otvalid/otvgpos.c @@ -4,7 +4,7 @@ * * OpenType GPOS table validation (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvgpos.h b/src/otvalid/otvgpos.h index b5d0f5485..48a9ed0f0 100644 --- a/src/otvalid/otvgpos.h +++ b/src/otvalid/otvgpos.h @@ -4,7 +4,7 @@ * * OpenType GPOS table validator (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvgsub.c b/src/otvalid/otvgsub.c index 5d40d9243..a479101b1 100644 --- a/src/otvalid/otvgsub.c +++ b/src/otvalid/otvgsub.c @@ -4,7 +4,7 @@ * * OpenType GSUB table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvjstf.c b/src/otvalid/otvjstf.c index 712039c66..1309f6d90 100644 --- a/src/otvalid/otvjstf.c +++ b/src/otvalid/otvjstf.c @@ -4,7 +4,7 @@ * * OpenType JSTF table validation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvmath.c b/src/otvalid/otvmath.c index 01fd863c9..b84845a72 100644 --- a/src/otvalid/otvmath.c +++ b/src/otvalid/otvmath.c @@ -4,7 +4,7 @@ * * OpenType MATH table validation (body). * - * Copyright (C) 2007-2023 by + * Copyright (C) 2007-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by George Williams. diff --git a/src/otvalid/otvmod.c b/src/otvalid/otvmod.c index d6057c5a4..74e50c787 100644 --- a/src/otvalid/otvmod.c +++ b/src/otvalid/otvmod.c @@ -4,7 +4,7 @@ * * FreeType's OpenType validation module implementation (body). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/otvmod.h b/src/otvalid/otvmod.h index f0e68dbc0..245c78020 100644 --- a/src/otvalid/otvmod.h +++ b/src/otvalid/otvmod.h @@ -5,7 +5,7 @@ * FreeType's OpenType validation module implementation * (specification). * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/otvalid/rules.mk b/src/otvalid/rules.mk index 800cb8733..123b696f2 100644 --- a/src/otvalid/rules.mk +++ b/src/otvalid/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2004-2023 by +# Copyright (C) 2004-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/pfr/module.mk b/src/pfr/module.mk index 388a38ed0..7df423101 100644 --- a/src/pfr/module.mk +++ b/src/pfr/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/pfr/pfr.c b/src/pfr/pfr.c index d3738152d..71b57930b 100644 --- a/src/pfr/pfr.c +++ b/src/pfr/pfr.c @@ -4,7 +4,7 @@ * * FreeType PFR driver component. * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c index 08fe41d54..cd701661f 100644 --- a/src/pfr/pfrcmap.c +++ b/src/pfr/pfrcmap.c @@ -4,7 +4,7 @@ * * FreeType PFR cmap handling (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrcmap.h b/src/pfr/pfrcmap.h index 8110f175e..ab7913575 100644 --- a/src/pfr/pfrcmap.h +++ b/src/pfr/pfrcmap.h @@ -4,7 +4,7 @@ * * FreeType PFR cmap handling (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c index 0048f5241..ffd822273 100644 --- a/src/pfr/pfrdrivr.c +++ b/src/pfr/pfrdrivr.c @@ -4,7 +4,7 @@ * * FreeType PFR driver interface (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrdrivr.h b/src/pfr/pfrdrivr.h index da14468d4..58954a9af 100644 --- a/src/pfr/pfrdrivr.h +++ b/src/pfr/pfrdrivr.h @@ -4,7 +4,7 @@ * * High-level Type PFR driver interface (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrerror.h b/src/pfr/pfrerror.h index 5dfb254d6..af0ddaf18 100644 --- a/src/pfr/pfrerror.h +++ b/src/pfr/pfrerror.h @@ -4,7 +4,7 @@ * * PFR error codes (specification only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index 48cf27ec8..6216cf169 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -4,7 +4,7 @@ * * FreeType PFR glyph loader (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrgload.h b/src/pfr/pfrgload.h index 92a59bc5d..d86549fbe 100644 --- a/src/pfr/pfrgload.h +++ b/src/pfr/pfrgload.h @@ -4,7 +4,7 @@ * * FreeType PFR glyph loader (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c index 856a5942f..358af5c78 100644 --- a/src/pfr/pfrload.c +++ b/src/pfr/pfrload.c @@ -4,7 +4,7 @@ * * FreeType PFR loader (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrload.h b/src/pfr/pfrload.h index d7b20a457..7390296d4 100644 --- a/src/pfr/pfrload.h +++ b/src/pfr/pfrload.h @@ -4,7 +4,7 @@ * * FreeType PFR loader (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index 8ef17c663..084d2ef5a 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -4,7 +4,7 @@ * * FreeType PFR object methods (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrobjs.h b/src/pfr/pfrobjs.h index fcf8c3812..1b548a1bc 100644 --- a/src/pfr/pfrobjs.h +++ b/src/pfr/pfrobjs.h @@ -4,7 +4,7 @@ * * FreeType PFR object methods (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrsbit.c b/src/pfr/pfrsbit.c index 46a988e8e..96cc7fece 100644 --- a/src/pfr/pfrsbit.c +++ b/src/pfr/pfrsbit.c @@ -4,7 +4,7 @@ * * FreeType PFR bitmap loader (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrsbit.h b/src/pfr/pfrsbit.h index 3e1dba9ae..105a2991c 100644 --- a/src/pfr/pfrsbit.h +++ b/src/pfr/pfrsbit.h @@ -4,7 +4,7 @@ * * FreeType PFR bitmap loader (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/pfrtypes.h b/src/pfr/pfrtypes.h index 2f8909f06..435a77c8f 100644 --- a/src/pfr/pfrtypes.h +++ b/src/pfr/pfrtypes.h @@ -4,7 +4,7 @@ * * FreeType PFR data structures (specification only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pfr/rules.mk b/src/pfr/rules.mk index 50695fd28..3e0c57ba3 100644 --- a/src/pfr/rules.mk +++ b/src/pfr/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c index db08941de..e2f6a8e5a 100644 --- a/src/psaux/afmparse.c +++ b/src/psaux/afmparse.c @@ -4,7 +4,7 @@ * * AFM parser (body). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/afmparse.h b/src/psaux/afmparse.h index 2d3b6e6e1..b77663728 100644 --- a/src/psaux/afmparse.h +++ b/src/psaux/afmparse.h @@ -4,7 +4,7 @@ * * AFM parser (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c index 40bf276cf..9556e11a5 100644 --- a/src/psaux/cffdecode.c +++ b/src/psaux/cffdecode.c @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (body). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/cffdecode.h b/src/psaux/cffdecode.h index e8bb4001c..038f7235c 100644 --- a/src/psaux/cffdecode.h +++ b/src/psaux/cffdecode.h @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (specification). * - * Copyright (C) 2017-2023 by + * Copyright (C) 2017-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/module.mk b/src/psaux/module.mk index c6fb4eb50..fd6b3e153 100644 --- a/src/psaux/module.mk +++ b/src/psaux/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/psaux/psaux.c b/src/psaux/psaux.c index 5879ed163..ffe89cd62 100644 --- a/src/psaux/psaux.c +++ b/src/psaux/psaux.c @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript driver component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psauxerr.h b/src/psaux/psauxerr.h index 895ffa48c..18428c40d 100644 --- a/src/psaux/psauxerr.h +++ b/src/psaux/psauxerr.h @@ -4,7 +4,7 @@ * * PS auxiliary module error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c index 45e35aa53..6826f9d8d 100644 --- a/src/psaux/psauxmod.c +++ b/src/psaux/psauxmod.c @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psauxmod.h b/src/psaux/psauxmod.h index 94dbf4881..82d7e348a 100644 --- a/src/psaux/psauxmod.h +++ b/src/psaux/psauxmod.h @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c index b9c7138d8..56c0ecd1d 100644 --- a/src/psaux/psconv.c +++ b/src/psaux/psconv.c @@ -4,7 +4,7 @@ * * Some convenience conversions (body). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psconv.h b/src/psaux/psconv.h index b7c3ee00b..91fcd15a1 100644 --- a/src/psaux/psconv.h +++ b/src/psaux/psconv.h @@ -4,7 +4,7 @@ * * Some convenience conversions (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index a70a8b1d7..b251b3596 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h index d5bce5410..345fc8a73 100644 --- a/src/psaux/psobjs.h +++ b/src/psaux/psobjs.h @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/rules.mk b/src/psaux/rules.mk index d542ab8ee..905352592 100644 --- a/src/psaux/rules.mk +++ b/src/psaux/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c index c4bcf599e..5681c3bd0 100644 --- a/src/psaux/t1cmap.c +++ b/src/psaux/t1cmap.c @@ -4,7 +4,7 @@ * * Type 1 character map support (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/t1cmap.h b/src/psaux/t1cmap.h index b3702498a..445e6a278 100644 --- a/src/psaux/t1cmap.h +++ b/src/psaux/t1cmap.h @@ -4,7 +4,7 @@ * * Type 1 character map support (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index 4b6b969bc..c74baa803 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psaux/t1decode.h b/src/psaux/t1decode.h index 0970def96..16203b8f7 100644 --- a/src/psaux/t1decode.h +++ b/src/psaux/t1decode.h @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (specification). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/module.mk b/src/pshinter/module.mk index dbc137dca..30325141f 100644 --- a/src/pshinter/module.mk +++ b/src/pshinter/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 4f622e1e4..2d7b9c227 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (body). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/src/pshinter/pshalgo.h b/src/pshinter/pshalgo.h index 3f0ba28a6..fb362f061 100644 --- a/src/pshinter/pshalgo.h +++ b/src/pshinter/pshalgo.h @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (specification). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c index d4c5eb32b..435f45838 100644 --- a/src/pshinter/pshglob.c +++ b/src/pshinter/pshglob.c @@ -5,7 +5,7 @@ * PostScript hinter global hinting management (body). * Inspired by the new auto-hinter module. * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h index 579eb2148..c5a5c9131 100644 --- a/src/pshinter/pshglob.h +++ b/src/pshinter/pshglob.h @@ -4,7 +4,7 @@ * * PostScript hinter global hinting management. * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshinter.c b/src/pshinter/pshinter.c index 54ed41096..ae2b53fee 100644 --- a/src/pshinter/pshinter.c +++ b/src/pshinter/pshinter.c @@ -4,7 +4,7 @@ * * FreeType PostScript Hinting module * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshmod.c b/src/pshinter/pshmod.c index 974a99e01..9965d5b16 100644 --- a/src/pshinter/pshmod.c +++ b/src/pshinter/pshmod.c @@ -4,7 +4,7 @@ * * FreeType PostScript hinter module implementation (body). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshmod.h b/src/pshinter/pshmod.h index 4bd781a35..62ac0a60f 100644 --- a/src/pshinter/pshmod.h +++ b/src/pshinter/pshmod.h @@ -4,7 +4,7 @@ * * PostScript hinter module interface (specification). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshnterr.h b/src/pshinter/pshnterr.h index 97624952d..e9641340e 100644 --- a/src/pshinter/pshnterr.h +++ b/src/pshinter/pshnterr.h @@ -4,7 +4,7 @@ * * PS Hinter error codes (specification only). * - * Copyright (C) 2003-2023 by + * Copyright (C) 2003-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 680e6d013..b10c70ec9 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -4,7 +4,7 @@ * * FreeType PostScript hints recorder (body). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/pshrec.h b/src/pshinter/pshrec.h index 0b2484af1..7e375af7b 100644 --- a/src/pshinter/pshrec.h +++ b/src/pshinter/pshrec.h @@ -4,7 +4,7 @@ * * Postscript (Type1/Type2) hints recorder (specification). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/pshinter/rules.mk b/src/pshinter/rules.mk index 50058e882..417bc59c2 100644 --- a/src/pshinter/rules.mk +++ b/src/pshinter/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2001-2023 by +# Copyright (C) 2001-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/psnames/module.mk b/src/psnames/module.mk index 1ee0ef8f7..f0494748f 100644 --- a/src/psnames/module.mk +++ b/src/psnames/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c index 8203a0465..35d054d1c 100644 --- a/src/psnames/psmodule.c +++ b/src/psnames/psmodule.c @@ -4,7 +4,7 @@ * * psnames module implementation (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psnames/psmodule.h b/src/psnames/psmodule.h index 0904700bf..770458316 100644 --- a/src/psnames/psmodule.h +++ b/src/psnames/psmodule.h @@ -4,7 +4,7 @@ * * High-level psnames module interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psnames/psnamerr.h b/src/psnames/psnamerr.h index 0073f8228..e123eb65e 100644 --- a/src/psnames/psnamerr.h +++ b/src/psnames/psnamerr.h @@ -4,7 +4,7 @@ * * PS names module error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psnames/psnames.c b/src/psnames/psnames.c index 93ed9332f..2933af1bf 100644 --- a/src/psnames/psnames.c +++ b/src/psnames/psnames.c @@ -4,7 +4,7 @@ * * FreeType psnames module component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psnames/pstables.h b/src/psnames/pstables.h index 7f92cce60..2a941b046 100644 --- a/src/psnames/pstables.h +++ b/src/psnames/pstables.h @@ -4,7 +4,7 @@ * * PostScript glyph names. * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk index 8d7c58068..19c5d32af 100644 --- a/src/psnames/rules.mk +++ b/src/psnames/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h index c239710e6..943f2aa0a 100644 --- a/src/raster/ftmisc.h +++ b/src/raster/ftmisc.h @@ -5,7 +5,7 @@ * Miscellaneous macros for stand-alone rasterizer (specification * only). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 9410c40ac..51ad66b60 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/raster/ftraster.h b/src/raster/ftraster.h index b511b3a99..ad9cb1b9f 100644 --- a/src/raster/ftraster.h +++ b/src/raster/ftraster.h @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c index 6d442b1ff..fd9f174f2 100644 --- a/src/raster/ftrend1.c +++ b/src/raster/ftrend1.c @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/raster/ftrend1.h b/src/raster/ftrend1.h index cec35c852..cf3e73c0a 100644 --- a/src/raster/ftrend1.h +++ b/src/raster/ftrend1.h @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/raster/module.mk b/src/raster/module.mk index 6ad1aa77b..2e322adb1 100644 --- a/src/raster/module.mk +++ b/src/raster/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/raster/raster.c b/src/raster/raster.c index 82f474547..fe33af242 100644 --- a/src/raster/raster.c +++ b/src/raster/raster.c @@ -4,7 +4,7 @@ * * FreeType monochrome rasterer module component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/raster/rasterrs.h b/src/raster/rasterrs.h index 989d8b44b..326d42e04 100644 --- a/src/raster/rasterrs.h +++ b/src/raster/rasterrs.h @@ -4,7 +4,7 @@ * * monochrome renderer error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/raster/rules.mk b/src/raster/rules.mk index 031b85fb9..8fea09728 100644 --- a/src/raster/rules.mk +++ b/src/raster/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c index e47273833..adde05ba1 100644 --- a/src/sdf/ftbsdf.c +++ b/src/sdf/ftbsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for bitmap fonts (body only). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c index bc4625d98..4394001e2 100644 --- a/src/sdf/ftsdf.c +++ b/src/sdf/ftsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for outline fonts (body). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdf.h b/src/sdf/ftsdf.h index 234c075b0..25a0a13bb 100644 --- a/src/sdf/ftsdf.h +++ b/src/sdf/ftsdf.h @@ -4,7 +4,7 @@ * * Signed Distance Field support (specification). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdfcommon.c b/src/sdf/ftsdfcommon.c index 5052201e2..5841ded21 100644 --- a/src/sdf/ftsdfcommon.c +++ b/src/sdf/ftsdfcommon.c @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (body). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdfcommon.h b/src/sdf/ftsdfcommon.h index 60ca9773e..44274e349 100644 --- a/src/sdf/ftsdfcommon.h +++ b/src/sdf/ftsdfcommon.h @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (specification). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdferrs.h b/src/sdf/ftsdferrs.h index 519db0fc2..5af873faf 100644 --- a/src/sdf/ftsdferrs.h +++ b/src/sdf/ftsdferrs.h @@ -4,7 +4,7 @@ * * Signed Distance Field error codes (specification only). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdfrend.c b/src/sdf/ftsdfrend.c index 5610c119f..d3324678d 100644 --- a/src/sdf/ftsdfrend.c +++ b/src/sdf/ftsdfrend.c @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (body). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/ftsdfrend.h b/src/sdf/ftsdfrend.h index 571ac833d..2ea6f8681 100644 --- a/src/sdf/ftsdfrend.h +++ b/src/sdf/ftsdfrend.h @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (specification). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sdf/module.mk b/src/sdf/module.mk index e896d20e6..b3b842a0b 100644 --- a/src/sdf/module.mk +++ b/src/sdf/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/sdf/rules.mk b/src/sdf/rules.mk index d7742413c..250b985d9 100644 --- a/src/sdf/rules.mk +++ b/src/sdf/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2020-2023 by +# Copyright (C) 2020-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/sdf/sdf.c b/src/sdf/sdf.c index c159b0812..6045b8330 100644 --- a/src/sdf/sdf.c +++ b/src/sdf/sdf.c @@ -4,7 +4,7 @@ * * FreeType Signed Distance Field renderer module component (body only). * - * Copyright (C) 2020-2023 by + * Copyright (C) 2020-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/sfnt/module.mk b/src/sfnt/module.mk index 4491a1b22..0818bfb0c 100644 --- a/src/sfnt/module.mk +++ b/src/sfnt/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c index 33712162e..76181568a 100644 --- a/src/sfnt/pngshim.c +++ b/src/sfnt/pngshim.c @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * diff --git a/src/sfnt/pngshim.h b/src/sfnt/pngshim.h index 903bd2bc3..6e7a5c08e 100644 --- a/src/sfnt/pngshim.h +++ b/src/sfnt/pngshim.h @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2023 by + * Copyright (C) 2013-2024 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk index 4d2d7e8d8..a24aa1d0d 100644 --- a/src/sfnt/rules.mk +++ b/src/sfnt/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index 7f0e4199a..81072207b 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfdriver.h b/src/sfnt/sfdriver.h index 2445958b6..6f71489fd 100644 --- a/src/sfnt/sfdriver.h +++ b/src/sfnt/sfdriver.h @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sferrors.h b/src/sfnt/sferrors.h index e7a8eb04b..d3ca1d9aa 100644 --- a/src/sfnt/sferrors.h +++ b/src/sfnt/sferrors.h @@ -4,7 +4,7 @@ * * SFNT error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c index 79da3b0c3..52411febc 100644 --- a/src/sfnt/sfnt.c +++ b/src/sfnt/sfnt.c @@ -4,7 +4,7 @@ * * Single object library component. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index be4336ecf..6ee4e5e93 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ * * SFNT object management (base). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfobjs.h b/src/sfnt/sfobjs.h index 906aebbf9..90847d957 100644 --- a/src/sfnt/sfobjs.h +++ b/src/sfnt/sfobjs.h @@ -4,7 +4,7 @@ * * SFNT object management (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfwoff.c b/src/sfnt/sfwoff.c index 7c0ce2205..8d33b7133 100644 --- a/src/sfnt/sfwoff.c +++ b/src/sfnt/sfwoff.c @@ -4,7 +4,7 @@ * * WOFF format management (base). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfwoff.h b/src/sfnt/sfwoff.h index d43842273..a04735ffe 100644 --- a/src/sfnt/sfwoff.h +++ b/src/sfnt/sfwoff.h @@ -4,7 +4,7 @@ * * WOFFF format management (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index 2be44a347..f3c9e2854 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -4,7 +4,7 @@ * * WOFF2 format management (base). * - * Copyright (C) 2019-2023 by + * Copyright (C) 2019-2024 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/sfwoff2.h b/src/sfnt/sfwoff2.h index 4901286ee..f41140648 100644 --- a/src/sfnt/sfwoff2.h +++ b/src/sfnt/sfwoff2.h @@ -4,7 +4,7 @@ * * WOFFF2 format management (specification). * - * Copyright (C) 2019-2023 by + * Copyright (C) 2019-2024 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c index 536fa7467..6138fc46d 100644 --- a/src/sfnt/ttbdf.c +++ b/src/sfnt/ttbdf.c @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded BDF properties (body). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttbdf.h b/src/sfnt/ttbdf.h index 0d7a0acec..d8d722b92 100644 --- a/src/sfnt/ttbdf.h +++ b/src/sfnt/ttbdf.h @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded BDF properties (specification). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c index 9ba25dcbc..28f4d1173 100644 --- a/src/sfnt/ttcmap.c +++ b/src/sfnt/ttcmap.c @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h index ff52917ed..e2c5e72bf 100644 --- a/src/sfnt/ttcmap.h +++ b/src/sfnt/ttcmap.h @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttcmapc.h b/src/sfnt/ttcmapc.h index 0af48c247..370898363 100644 --- a/src/sfnt/ttcmapc.h +++ b/src/sfnt/ttcmapc.h @@ -4,7 +4,7 @@ * * TT CMAP classes definitions (specification only). * - * Copyright (C) 2009-2023 by + * Copyright (C) 2009-2024 by * Oran Agra and Mickey Gabel. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c index 7f8bf74b2..312b70a5f 100644 --- a/src/sfnt/ttcolr.c +++ b/src/sfnt/ttcolr.c @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (body). * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/src/sfnt/ttcolr.h b/src/sfnt/ttcolr.h index 20c85f035..30031464c 100644 --- a/src/sfnt/ttcolr.h +++ b/src/sfnt/ttcolr.h @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (specification). * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/src/sfnt/ttcpal.c b/src/sfnt/ttcpal.c index 46ae08596..997eb869f 100644 --- a/src/sfnt/ttcpal.c +++ b/src/sfnt/ttcpal.c @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (body). * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/src/sfnt/ttcpal.h b/src/sfnt/ttcpal.h index 8e9913f0c..bb301ae88 100644 --- a/src/sfnt/ttcpal.h +++ b/src/sfnt/ttcpal.h @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (specification). * - * Copyright (C) 2018-2023 by + * Copyright (C) 2018-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c index a47d08bd6..f0411366a 100644 --- a/src/sfnt/ttkern.c +++ b/src/sfnt/ttkern.c @@ -5,7 +5,7 @@ * Load the basic TrueType kerning table. This doesn't handle * kerning data within the GPOS table at the moment. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttkern.h b/src/sfnt/ttkern.h index 960c7da49..a54e51df1 100644 --- a/src/sfnt/ttkern.h +++ b/src/sfnt/ttkern.h @@ -5,7 +5,7 @@ * Load the basic TrueType kerning table. This doesn't handle * kerning data within the GPOS table at the moment. * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index 7b44e9cd2..fe4d51559 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h index 1499dd573..2b1d62d9b 100644 --- a/src/sfnt/ttload.h +++ b/src/sfnt/ttload.h @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c index 38ee9ae72..278841185 100644 --- a/src/sfnt/ttmtx.c +++ b/src/sfnt/ttmtx.c @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (body). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttmtx.h b/src/sfnt/ttmtx.h index 56d2b6276..34b3c0e18 100644 --- a/src/sfnt/ttmtx.h +++ b/src/sfnt/ttmtx.h @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (specification). * - * Copyright (C) 2006-2023 by + * Copyright (C) 2006-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index dcde7def8..a90237ad0 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttpost.h b/src/sfnt/ttpost.h index 528f1c5f2..150db6c39 100644 --- a/src/sfnt/ttpost.h +++ b/src/sfnt/ttpost.h @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index 03f90a628..cb3a8abf1 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (body). * - * Copyright (C) 2005-2023 by + * Copyright (C) 2005-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Copyright 2013 by Google, Inc. diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h index 07e2db461..96f80a584 100644 --- a/src/sfnt/ttsbit.h +++ b/src/sfnt/ttsbit.h @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttsvg.c b/src/sfnt/ttsvg.c index 4461d483b..298afd8b5 100644 --- a/src/sfnt/ttsvg.c +++ b/src/sfnt/ttsvg.c @@ -4,7 +4,7 @@ * * OpenType SVG Color (specification). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/ttsvg.h b/src/sfnt/ttsvg.h index 3f32321de..20f9e47c9 100644 --- a/src/sfnt/ttsvg.h +++ b/src/sfnt/ttsvg.h @@ -4,7 +4,7 @@ * * OpenType SVG Color (specification). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/woff2tags.c b/src/sfnt/woff2tags.c index eeedd9906..532ccfa17 100644 --- a/src/sfnt/woff2tags.c +++ b/src/sfnt/woff2tags.c @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (base). * - * Copyright (C) 2019-2023 by + * Copyright (C) 2019-2024 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/sfnt/woff2tags.h b/src/sfnt/woff2tags.h index 1201848e5..d03b4b41b 100644 --- a/src/sfnt/woff2tags.h +++ b/src/sfnt/woff2tags.h @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (specification). * - * Copyright (C) 2019-2023 by + * Copyright (C) 2019-2024 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 79b864c1f..576e837dc 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ * * A new `perfect' anti-aliasing renderer (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/smooth/ftgrays.h b/src/smooth/ftgrays.h index a5001bf40..940fbe8c7 100644 --- a/src/smooth/ftgrays.h +++ b/src/smooth/ftgrays.h @@ -4,7 +4,7 @@ * * FreeType smooth renderer declaration * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/smooth/ftsmerrs.h b/src/smooth/ftsmerrs.h index f4ac93dc4..6d41fb8e0 100644 --- a/src/smooth/ftsmerrs.h +++ b/src/smooth/ftsmerrs.h @@ -4,7 +4,7 @@ * * smooth renderer error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c index 9b0e8886c..f0acc1ea4 100644 --- a/src/smooth/ftsmooth.c +++ b/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (body). * - * Copyright (C) 2000-2023 by + * Copyright (C) 2000-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/smooth/ftsmooth.h b/src/smooth/ftsmooth.h index f8bdc9938..d7b61a9e6 100644 --- a/src/smooth/ftsmooth.h +++ b/src/smooth/ftsmooth.h @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/smooth/module.mk b/src/smooth/module.mk index 82ab2fa59..9b4526fb5 100644 --- a/src/smooth/module.mk +++ b/src/smooth/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/smooth/rules.mk b/src/smooth/rules.mk index 5d89c7540..f50fc475c 100644 --- a/src/smooth/rules.mk +++ b/src/smooth/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/smooth/smooth.c b/src/smooth/smooth.c index 9a0b824c2..8c5068180 100644 --- a/src/smooth/smooth.c +++ b/src/smooth/smooth.c @@ -4,7 +4,7 @@ * * FreeType anti-aliasing rasterer module component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/svg/ftsvg.c b/src/svg/ftsvg.c index ba237f638..35788a2d8 100644 --- a/src/svg/ftsvg.c +++ b/src/svg/ftsvg.c @@ -4,7 +4,7 @@ * * The FreeType SVG renderer interface (body). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/src/svg/ftsvg.h b/src/svg/ftsvg.h index 9c496caa1..623c091dc 100644 --- a/src/svg/ftsvg.h +++ b/src/svg/ftsvg.h @@ -4,7 +4,7 @@ * * The FreeType SVG renderer interface (specification). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/src/svg/module.mk b/src/svg/module.mk index 00beca60f..3f085433b 100644 --- a/src/svg/module.mk +++ b/src/svg/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2022-2023 by +# Copyright (C) 2022-2024 by # David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/svg/rules.mk b/src/svg/rules.mk index 4f4409755..56276285e 100644 --- a/src/svg/rules.mk +++ b/src/svg/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2022-2023 by +# Copyright (C) 2022-2024 by # David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/svg/svg.c b/src/svg/svg.c index 373c28ed9..1f1c04b2f 100644 --- a/src/svg/svg.c +++ b/src/svg/svg.c @@ -4,7 +4,7 @@ * * FreeType SVG renderer module component (body only). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/src/svg/svgtypes.h b/src/svg/svgtypes.h index 1d608032c..f1d6d73c5 100644 --- a/src/svg/svgtypes.h +++ b/src/svg/svgtypes.h @@ -4,7 +4,7 @@ * * The FreeType SVG renderer internal types (specification). * - * Copyright (C) 2022-2023 by + * Copyright (C) 2022-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/src/tools/afblue.pl b/src/tools/afblue.pl index 1098e30ab..1341c7734 100644 --- a/src/tools/afblue.pl +++ b/src/tools/afblue.pl @@ -5,7 +5,7 @@ # # Process a blue zone character data file. # -# Copyright (C) 2013-2023 by +# Copyright (C) 2013-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, diff --git a/src/tools/glnames.py b/src/tools/glnames.py index 41509dbc2..0b6d82474 100644 --- a/src/tools/glnames.py +++ b/src/tools/glnames.py @@ -3,7 +3,7 @@ # # FreeType 2 glyph name builder # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/tools/update-copyright-year b/src/tools/update-copyright-year index b0b60fb88..6b359ff66 100755 --- a/src/tools/update-copyright-year +++ b/src/tools/update-copyright-year @@ -2,7 +2,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -i "$0" ${1+"$@"}' & eval 'exec perl -wS -i "$0" $argv:q' if 0; -# Copyright (C) 2015-2023 by +# Copyright (C) 2015-2024 by # Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/truetype/module.mk b/src/truetype/module.mk index 5d44ac1f4..a53cb64c3 100644 --- a/src/truetype/module.mk +++ b/src/truetype/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk index dde26de1c..0552d68e6 100644 --- a/src/truetype/rules.mk +++ b/src/truetype/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/truetype/truetype.c b/src/truetype/truetype.c index fcc0ea334..fe9cb9247 100644 --- a/src/truetype/truetype.c +++ b/src/truetype/truetype.c @@ -4,7 +4,7 @@ * * FreeType TrueType driver component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c index 6b0acda37..4ab68eb9a 100644 --- a/src/truetype/ttdriver.c +++ b/src/truetype/ttdriver.c @@ -4,7 +4,7 @@ * * TrueType font driver implementation (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttdriver.h b/src/truetype/ttdriver.h index 757a66f42..3e1cf234f 100644 --- a/src/truetype/ttdriver.h +++ b/src/truetype/ttdriver.h @@ -4,7 +4,7 @@ * * High-level TrueType driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/tterrors.h b/src/truetype/tterrors.h index 008ee9985..7ad937bd0 100644 --- a/src/truetype/tterrors.h +++ b/src/truetype/tterrors.h @@ -4,7 +4,7 @@ * * TrueType error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index c7468ec99..df803a0f3 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h index f18637dce..22ea967f3 100644 --- a/src/truetype/ttgload.h +++ b/src/truetype/ttgload.h @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 78b80782a..3dd99abe3 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttgxvar.h b/src/truetype/ttgxvar.h index e3da6d170..9326011e3 100644 --- a/src/truetype/ttgxvar.h +++ b/src/truetype/ttgxvar.h @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader (specification) * - * Copyright (C) 2004-2023 by + * Copyright (C) 2004-2024 by * David Turner, Robert Wilhelm, Werner Lemberg and George Williams. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index 79df4555d..0889c6151 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h index e98e258fe..4f1a9bbc6 100644 --- a/src/truetype/ttinterp.h +++ b/src/truetype/ttinterp.h @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 9126f9eab..71d11c9c1 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -4,7 +4,7 @@ * * Objects manager (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h index 40eb37b4c..0a63e6729 100644 --- a/src/truetype/ttobjs.h +++ b/src/truetype/ttobjs.h @@ -4,7 +4,7 @@ * * Objects manager (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c index 54a64c7b4..9505b5f17 100644 --- a/src/truetype/ttpload.c +++ b/src/truetype/ttpload.c @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/truetype/ttpload.h b/src/truetype/ttpload.h index ed229fa46..bc32b5802 100644 --- a/src/truetype/ttpload.h +++ b/src/truetype/ttpload.h @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/module.mk b/src/type1/module.mk index 33bceff8a..97d6111cf 100644 --- a/src/type1/module.mk +++ b/src/type1/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/type1/rules.mk b/src/type1/rules.mk index efe744b77..7cabd14b0 100644 --- a/src/type1/rules.mk +++ b/src/type1/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index d9b9398b0..a63cd4dc4 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1afm.h b/src/type1/t1afm.h index e0d5aa5a8..7f5cdda19 100644 --- a/src/type1/t1afm.h +++ b/src/type1/t1afm.h @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c index ec63904ed..8ed01914a 100644 --- a/src/type1/t1driver.c +++ b/src/type1/t1driver.c @@ -4,7 +4,7 @@ * * Type 1 driver interface (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1driver.h b/src/type1/t1driver.h index ee7fcf43e..5ff52b55b 100644 --- a/src/type1/t1driver.h +++ b/src/type1/t1driver.h @@ -4,7 +4,7 @@ * * High-level Type 1 driver interface (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1errors.h b/src/type1/t1errors.h index 2fbd1e513..8aeb24ae1 100644 --- a/src/type1/t1errors.h +++ b/src/type1/t1errors.h @@ -4,7 +4,7 @@ * * Type 1 error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c index a32a4649d..c29e68251 100644 --- a/src/type1/t1gload.c +++ b/src/type1/t1gload.c @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1gload.h b/src/type1/t1gload.h index c06484758..17a6a5941 100644 --- a/src/type1/t1gload.h +++ b/src/type1/t1gload.h @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 5acd52a47..7f63898fc 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -4,7 +4,7 @@ * * Type 1 font loader (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1load.h b/src/type1/t1load.h index d8c9d2d8a..a45efa7cb 100644 --- a/src/type1/t1load.h +++ b/src/type1/t1load.h @@ -4,7 +4,7 @@ * * Type 1 font loader (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c index 69e4fd506..b1b27c31f 100644 --- a/src/type1/t1objs.c +++ b/src/type1/t1objs.c @@ -4,7 +4,7 @@ * * Type 1 objects manager (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1objs.h b/src/type1/t1objs.h index 03847b27e..3809370c1 100644 --- a/src/type1/t1objs.h +++ b/src/type1/t1objs.h @@ -4,7 +4,7 @@ * * Type 1 objects manager (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c index 6dec6c16c..3717ea7c5 100644 --- a/src/type1/t1parse.c +++ b/src/type1/t1parse.c @@ -4,7 +4,7 @@ * * Type 1 parser (body). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1parse.h b/src/type1/t1parse.h index 0d9a2865d..a0a2134d4 100644 --- a/src/type1/t1parse.h +++ b/src/type1/t1parse.h @@ -4,7 +4,7 @@ * * Type 1 parser (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/t1tokens.h b/src/type1/t1tokens.h index 40f360926..5a3d2f1ef 100644 --- a/src/type1/t1tokens.h +++ b/src/type1/t1tokens.h @@ -4,7 +4,7 @@ * * Type 1 tokenizer (specification). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type1/type1.c b/src/type1/type1.c index d9bd8cad9..d7ff53c79 100644 --- a/src/type1/type1.c +++ b/src/type1/type1.c @@ -4,7 +4,7 @@ * * FreeType Type 1 driver component (body only). * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/module.mk b/src/type42/module.mk index d98b12319..7895f48c0 100644 --- a/src/type42/module.mk +++ b/src/type42/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/type42/rules.mk b/src/type42/rules.mk index 41cb358d3..87f62a282 100644 --- a/src/type42/rules.mk +++ b/src/type42/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2002-2023 by +# Copyright (C) 2002-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c index ee5fd44a9..25f507f15 100644 --- a/src/type42/t42drivr.c +++ b/src/type42/t42drivr.c @@ -4,7 +4,7 @@ * * High-level Type 42 driver interface (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42drivr.h b/src/type42/t42drivr.h index ec7da18cc..5b3852b86 100644 --- a/src/type42/t42drivr.h +++ b/src/type42/t42drivr.h @@ -4,7 +4,7 @@ * * High-level Type 42 driver interface (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42error.h b/src/type42/t42error.h index dcea9c4f6..f52205e2f 100644 --- a/src/type42/t42error.h +++ b/src/type42/t42error.h @@ -4,7 +4,7 @@ * * Type 42 error codes (specification only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index bf4028e75..7010ba86e 100644 --- a/src/type42/t42objs.c +++ b/src/type42/t42objs.c @@ -4,7 +4,7 @@ * * Type 42 objects manager (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h index 33e6215e1..3ca83bc54 100644 --- a/src/type42/t42objs.h +++ b/src/type42/t42objs.h @@ -4,7 +4,7 @@ * * Type 42 objects manager (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index 889bd1803..e53d35287 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -4,7 +4,7 @@ * * Type 42 font parser (body). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42parse.h b/src/type42/t42parse.h index 5741c5413..e97786162 100644 --- a/src/type42/t42parse.h +++ b/src/type42/t42parse.h @@ -4,7 +4,7 @@ * * Type 42 font parser (specification). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/t42types.h b/src/type42/t42types.h index 0bfe14ee4..550cc07ca 100644 --- a/src/type42/t42types.h +++ b/src/type42/t42types.h @@ -4,7 +4,7 @@ * * Type 42 font data types (specification only). * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/src/type42/type42.c b/src/type42/type42.c index 8d2302c8e..a9444f0f5 100644 --- a/src/type42/type42.c +++ b/src/type42/type42.c @@ -4,7 +4,7 @@ * * FreeType Type 42 driver component. * - * Copyright (C) 2002-2023 by + * Copyright (C) 2002-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/winfonts/fnterrs.h b/src/winfonts/fnterrs.h index dafdb07b4..7ca659239 100644 --- a/src/winfonts/fnterrs.h +++ b/src/winfonts/fnterrs.h @@ -4,7 +4,7 @@ * * Win FNT/FON error codes (specification only). * - * Copyright (C) 2001-2023 by + * Copyright (C) 2001-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/src/winfonts/module.mk b/src/winfonts/module.mk index 78a290065..f2d8ace2b 100644 --- a/src/winfonts/module.mk +++ b/src/winfonts/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/winfonts/rules.mk b/src/winfonts/rules.mk index b39c519e0..1a0b87aa7 100644 --- a/src/winfonts/rules.mk +++ b/src/winfonts/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2023 by +# Copyright (C) 1996-2024 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index 1160e4ef3..1a0f01949 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -4,7 +4,7 @@ * * FreeType font driver for Windows FNT/FON files * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * Copyright 2003 Huw D M Davies for Codeweavers * Copyright 2007 Dmitry Timoshkov for Codeweavers diff --git a/src/winfonts/winfnt.h b/src/winfonts/winfnt.h index 2f75b9e86..78137496f 100644 --- a/src/winfonts/winfnt.h +++ b/src/winfonts/winfnt.h @@ -4,7 +4,7 @@ * * FreeType font driver for Windows FNT/FON files * - * Copyright (C) 1996-2023 by + * Copyright (C) 1996-2024 by * David Turner, Robert Wilhelm, and Werner Lemberg. * Copyright 2007 Dmitry Timoshkov for Codeweavers * diff --git a/vms_make.com b/vms_make.com index 3e2dca487..65d2eb586 100644 --- a/vms_make.com +++ b/vms_make.com @@ -1,6 +1,6 @@ $! make FreeType 2 under OpenVMS $! -$! Copyright (C) 2003-2023 by +$! Copyright (C) 2003-2024 by $! David Turner, Robert Wilhelm, and Werner Lemberg. $! $! This file is part of the FreeType project, and may only be used, modified, From 546237e1bbbb1269b5f76a878ea5eed3c8e268b5 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 23 Feb 2024 11:55:53 +0100 Subject: [PATCH 104/191] * src/truetype/ttgxvar.c (ft_var_to_normalized): Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66543 --- src/truetype/ttgxvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 3dd99abe3..7b33b8e52 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -2142,7 +2142,7 @@ innerIndex ); /* Convert to 16.16 format before adding. */ - v += delta * 4; + v += MUL_INT( delta, 4 ); /* Clamp value range. */ v = v >= 0x10000L ? 0x10000 : v; From 2a790a9f4937c3950028bd3de29e63c6b0d419ce Mon Sep 17 00:00:00 2001 From: Ben Wanger Date: Wed, 28 Feb 2024 17:45:19 -0500 Subject: [PATCH 105/191] [cff, truetype] Always set up default variable instance. For default variable instances `cff_face_init` did not set the blend. This mostly worked as later use of the unset blend produced the default variation. However, if a user called `TT_Get_MM_Var` the blend would be partially set up, but not fully. In particular the number of axes, the axis definitions, and the instance locations would be set up, but not the current instance location (`coords` and `normalizedcoords`). This could lead to the default instances of CFF2 fonts erroring on any use of `blend`. Ensure the default variable instance is fully set up by always calling `FT_Set_Named_Instance` on a variable face. * src/cff/cffobjs.c (cff_face_init): Call `FT_Set_Named_Instance` on default instances. * src/truetype/ttobjs.c (tt_face_init): Ditto. Fixes #1268. --- src/cff/cffobjs.c | 3 +-- src/truetype/ttobjs.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index 7764a7edd..7c6713739 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -694,8 +694,7 @@ FT_UInt instance_index = (FT_UInt)face_index >> 16; - if ( FT_HAS_MULTIPLE_MASTERS( cffface ) && - instance_index > 0 ) + if ( FT_HAS_MULTIPLE_MASTERS( cffface ) ) { error = FT_Set_Named_Instance( cffface, instance_index ); if ( error ) diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 71d11c9c1..3cdbfff1b 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -784,8 +784,7 @@ FT_UInt instance_index = (FT_UInt)face_index >> 16; - if ( FT_HAS_MULTIPLE_MASTERS( ttface ) && - instance_index > 0 ) + if ( FT_HAS_MULTIPLE_MASTERS( ttface ) ) { error = FT_Set_Named_Instance( ttface, instance_index ); if ( error ) From 2cc589043ea195f4a398b18f7cc2ec36c0ec0885 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 4 Mar 2024 12:14:51 -0600 Subject: [PATCH 106/191] meson: Use the standard dependency mechanism to find bzip2 This follows standard conventions in Meson by using the pkg-config file. This change allows Conan to switch to the Meson build system. --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 2939e288b..18d812499 100644 --- a/meson.build +++ b/meson.build @@ -316,8 +316,10 @@ else endif # BZip2 support -bzip2_dep = cc.find_library('bz2', - required: get_option('bzip2')) +bzip2_dep = dependency('bzip2', required: false) +if not bzip2_dep.found() + bzip2_dep = cc.find_library('bz2', has_headers: ['bzlib.h'], required: get_option('bzip2')) +endif if bzip2_dep.found() ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BZIP2'] From 660a7017faba70e6806a01447c32d37568ac5ee4 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 6 Mar 2024 20:08:04 +0000 Subject: [PATCH 107/191] * CMakeLists.txt: Bump required version to 3.5. Fixes #1267. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0ca0f2b1..a5971f57e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,7 +110,7 @@ # To minimize the number of cmake_policy() workarounds, # CMake >= 3 is requested. -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...3.5) if (NOT CMAKE_VERSION VERSION_LESS 3.3) # Allow symbol visibility settings also on static libraries. CMake < 3.3 From 17545d4bf72175a8ea8020dcbd4d462234d2b5d0 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Fri, 1 Mar 2024 11:16:48 -0500 Subject: [PATCH 108/191] Avoid n^2 scanning for binary data. When creating a CID parser the location of the 'StartData' or '/sfnts' tokens needs to be known. However, the token parser requires that the entire document be in memory and flattening the entire stream into memory is to be avoided. To avoid forcing the entire stream into memory, previously this code would scan through the stream looking for 'StartData' or '/sfnts' as strings. However, these strings could have been in a comment or string token, so the stream would be read into memory up to that point and the parser run to check that these strings were actually tokens. This forced a parser restart from the beginning each time; as a result, data with many 'StartData' non-tokens would take n^2 time to check. * src/cid/cidparse.c (cid_parser_new): Change algorithm to make the initial scan look for the last possible 'StartData' or '/sfnts' string in the stream. The stream is read forward instead of backward as a typical normal CID font will have one 'StartData' toward the beginning of the data and it it much faster to read the data from beginning to end instead of end to beginning. For memory-based fonts the limit is set to the end of the stream since the stream is already in memory. Then the parser is run once to look for 'StartData' or '/sfnts' tokens. If they are found the parser is re-set to reflect this new information. Reported as https://issues.chromium.org/issues/40201695 --- src/cid/cidparse.c | 67 +++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c index 1e7c9d2bf..73a3ade89 100644 --- a/src/cid/cidparse.c +++ b/src/cid/cidparse.c @@ -90,10 +90,15 @@ if ( error ) goto Exit; - Again: - /* now, read the rest of the file until we find */ - /* `StartData' or `/sfnts' */ + if ( !stream->read ) { + /* just parse memory-based streams */ + offset = stream->size; + } + else { + /* Find the last `StartData` or `/sfnts`. The parser requires */ + /* contiguous memory; attempt to pin as little as necessary. */ + /* * The algorithm is as follows (omitting the case with less than 256 * bytes to fill for simplicity). @@ -119,7 +124,8 @@ FT_Byte* p = buffer; - for ( offset = FT_STREAM_POS(); ; offset += 256 ) + offset = 0; + while ( 1 ) { FT_ULong stream_len; @@ -127,7 +133,7 @@ stream_len = stream->size - FT_STREAM_POS(); read_len = FT_MIN( read_len, stream_len ); - if ( FT_STREAM_READ( p, read_len ) ) + if ( read_len && FT_STREAM_READ( p, read_len ) ) goto Exit; /* ensure that we do not compare with data beyond the buffer */ @@ -141,20 +147,23 @@ ft_strncmp( (char*)p, STARTDATA, STARTDATA_LEN ) == 0 ) { /* save offset of binary data after `StartData' */ - offset += (FT_ULong)( p - buffer ) + STARTDATA_LEN + 1; - goto Found; + offset = FT_STREAM_POS() - read_len - read_offset + + (FT_ULong)( p - buffer ) + STARTDATA_LEN + 1; } else if ( p[1] == 's' && ft_strncmp( (char*)p, SFNTS, SFNTS_LEN ) == 0 ) { - offset += (FT_ULong)( p - buffer ) + SFNTS_LEN + 1; - goto Found; + offset = FT_STREAM_POS() - read_len - read_offset + + (FT_ULong)( p - buffer ) + SFNTS_LEN + 1; } } - if ( read_offset + read_len < STARTDATA_LEN ) + if ( read_offset + read_len <= STARTDATA_LEN ) { - FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" )); + if ( offset ) + goto Found; + + FT_TRACE2(( "cid_parser_new: no `StartData` keyword found\n" )); error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -171,9 +180,9 @@ } Found: - /* We have found the start of the binary data or the `/sfnts' token. */ - /* Now rewind and extract the frame corresponding to this PostScript */ - /* section. */ + /* We have found an efficient range to look for the binary data or */ + /* `/sfnts' token. Now rewind and extract the frame corresponding to */ + /* this PostScript section. */ ps_len = offset - base_offset; if ( FT_STREAM_SEEK( base_offset ) || @@ -187,8 +196,8 @@ parser->root.limit = parser->root.cursor + ps_len; parser->num_dict = FT_UINT_MAX; - /* Finally, we check whether `StartData' or `/sfnts' was real -- */ - /* it could be in a comment or string. We also get the arguments */ + /* Find the first real `StartData' or `/sfnts' -- the last one */ + /* could be in a comment or string. We also get the arguments */ /* of `StartData' to find out whether the data is represented in */ /* binary or hex format. */ @@ -216,6 +225,7 @@ { T1_TokenRec type_token; FT_Long binary_length; + FT_ULong found_offset; parser->root.cursor = arg1; @@ -234,6 +244,24 @@ parser->binary_length = (FT_ULong)binary_length; } + /* set the real values for the parser, if different */ + found_offset = (FT_ULong)( cur - parser->postscript ) + + STARTDATA_LEN + 1; + if ( found_offset != offset ) + { + FT_FRAME_RELEASE( parser->postscript ); + + ps_len = found_offset - base_offset; + if ( FT_STREAM_SEEK( base_offset ) || + FT_FRAME_EXTRACT( ps_len, parser->postscript ) ) + goto Exit; + + parser->data_offset = found_offset; + parser->postscript_len = ps_len; + parser->root.base = parser->postscript; + parser->root.cursor = parser->postscript; + parser->root.limit = parser->root.cursor + ps_len; + } goto Exit; } else if ( cur[1] == 's' && @@ -251,11 +279,8 @@ cur = parser->root.cursor; } - /* we haven't found the correct `StartData'; go back and continue */ - /* searching */ - FT_FRAME_RELEASE( parser->postscript ); - if ( !FT_STREAM_SEEK( offset ) ) - goto Again; + FT_TRACE2(( "cid_parser_new: no `StartData` token found\n" )); + error = FT_THROW( Invalid_File_Format ); Exit: return error; From f42ce25563b73fed0123d18a2556b9ba01d2c76b Mon Sep 17 00:00:00 2001 From: Ben Wanger Date: Fri, 8 Mar 2024 14:55:12 -0500 Subject: [PATCH 109/191] [colr] Ensure enough bytes for PaintColrLayers * src/sfnt/ttcolr.c (read_paint): check that there are five additional bytes to be read when reading PaintColrLayers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66566 --- src/sfnt/ttcolr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c index 312b70a5f..1c3fd70d0 100644 --- a/src/sfnt/ttcolr.c +++ b/src/sfnt/ttcolr.c @@ -661,6 +661,7 @@ FT_UInt32 first_layer_index; + ENSURE_READ_BYTES( 5 ); num_layers = FT_NEXT_BYTE( p ); if ( num_layers > colr->num_layers_v1 ) return 0; From 674d629b5e9e59a376922113a3b5de019e2c9fe2 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 14 Apr 2024 13:06:01 -0400 Subject: [PATCH 110/191] [smooth] Store persistent clipping box. * src/smooth/ftgrays.c (gray_TWorker, gray_raster_render): Add and set the new structure field. (gray_convert_glyph): Use it. --- src/smooth/ftgrays.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 576e837dc..0ca5e30b3 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -489,7 +489,7 @@ typedef ptrdiff_t FT_PtrDist; typedef struct gray_TWorker_ { - ft_jmp_buf jump_buffer; + FT_BBox cbox; TCoord min_ex, max_ex; /* min and max integer pixel coordinates */ TCoord min_ey, max_ey; @@ -510,6 +510,8 @@ typedef ptrdiff_t FT_PtrDist; FT_Raster_Span_Func render_span; void* render_span_data; + ft_jmp_buf jump_buffer; + } gray_TWorker, *gray_PWorker; #if defined( _MSC_VER ) @@ -1863,11 +1865,8 @@ typedef ptrdiff_t FT_PtrDist; static int gray_convert_glyph( RAS_ARG ) { - const TCoord yMin = ras.min_ey; - const TCoord yMax = ras.max_ey; - TCell buffer[FT_MAX_GRAY_POOL]; - size_t height = (size_t)( yMax - yMin ); + size_t height = (size_t)( ras.cbox.yMax - ras.cbox.yMin ); size_t n = FT_MAX_GRAY_POOL / 8; TCoord y; TCoord bands[32]; /* enough to accommodate bisections */ @@ -1893,11 +1892,14 @@ typedef ptrdiff_t FT_PtrDist; height = ( height + n - 1 ) / n; } - for ( y = yMin; y < yMax; ) + ras.min_ex = ras.cbox.xMin; + ras.max_ex = ras.cbox.xMax; + + for ( y = ras.cbox.yMin; y < ras.cbox.yMax; ) { ras.min_ey = y; y += height; - ras.max_ey = FT_MIN( y, yMax ); + ras.max_ey = FT_MIN( y, ras.cbox.yMax ); band = bands; band[1] = ras.min_ey; @@ -2001,10 +2003,7 @@ typedef ptrdiff_t FT_PtrDist; ras.render_span = (FT_Raster_Span_Func)params->gray_spans; ras.render_span_data = params->user; - ras.min_ex = params->clip_box.xMin; - ras.min_ey = params->clip_box.yMin; - ras.max_ex = params->clip_box.xMax; - ras.max_ey = params->clip_box.yMax; + ras.cbox = params->clip_box; } else { @@ -2030,14 +2029,14 @@ typedef ptrdiff_t FT_PtrDist; ras.render_span = (FT_Raster_Span_Func)NULL; ras.render_span_data = NULL; - ras.min_ex = 0; - ras.min_ey = 0; - ras.max_ex = (FT_Pos)target_map->width; - ras.max_ey = (FT_Pos)target_map->rows; + ras.cbox.xMin = 0; + ras.cbox.yMin = 0; + ras.cbox.xMax = (FT_Pos)target_map->width; + ras.cbox.yMax = (FT_Pos)target_map->rows; } /* exit if nothing to do */ - if ( ras.max_ex <= ras.min_ex || ras.max_ey <= ras.min_ey ) + if ( ras.cbox.xMin >= ras.cbox.xMax || ras.cbox.yMin >= ras.cbox.yMax ) return Smooth_Err_Ok; return gray_convert_glyph( RAS_VAR ); From fff58f5424e4214c5ce3b35f8735d670ec40496f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 14 Apr 2024 15:12:31 -0400 Subject: [PATCH 111/191] * src/smooth/ftgrays.c (gray_convert_glyph): Refactor for convenience. --- src/smooth/ftgrays.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 0ca5e30b3..3345e7991 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1907,23 +1907,24 @@ typedef ptrdiff_t FT_PtrDist; do { - TCoord width = band[0] - band[1]; - TCoord w; + TCoord i; int error; - for ( w = 0; w < width; ++w ) - ras.ycells[w] = ras.cell_null; + ras.min_ey = band[1]; + ras.max_ey = band[0]; - /* memory management: skip ycells */ - n = ( (size_t)width * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) / - sizeof ( TCell ); + ras.count_ey = ras.max_ey - ras.min_ey; + + /* memory management: zero out and skip ycells */ + for ( i = 0; i < ras.count_ey; ++i ) + ras.ycells[i] = ras.cell_null; + + n = ( (size_t)ras.count_ey * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) + / sizeof ( TCell ); ras.cell_free = buffer + n; ras.cell = ras.cell_null; - ras.min_ey = band[1]; - ras.max_ey = band[0]; - ras.count_ey = width; error = gray_convert_glyph_inner( RAS_VAR_ continued ); continued = 1; @@ -1941,10 +1942,10 @@ typedef ptrdiff_t FT_PtrDist; return error; /* render pool overflow; we will reduce the render band by half */ - width >>= 1; + i = ( band[0] - band[1] ) >> 1; /* this should never happen even with tiny rendering pool */ - if ( width == 0 ) + if ( i == 0 ) { FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" )); return FT_THROW( Raster_Overflow ); @@ -1952,7 +1953,7 @@ typedef ptrdiff_t FT_PtrDist; band++; band[1] = band[0]; - band[0] += width; + band[0] += i; } while ( band >= bands ); } From b3a6a20a805366e0bc7044d1402d04c53f9c1660 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 14 Apr 2024 15:37:57 -0400 Subject: [PATCH 112/191] [smooth] Switch to vertical bisections. With horizontal bisections, the smallest section is a whole single scanline. Almost horizontal lines or other complex scanlines can easily overflow the rendering pool. Switching to vertical bisections splits the scanlines and should rule out the overflows. Fixes #1269. * src/smooth/ftgrays.c (gray_convert_glyph): Bisect vertically. --- src/smooth/ftgrays.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 3345e7991..f011e9f8d 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1892,18 +1892,17 @@ typedef ptrdiff_t FT_PtrDist; height = ( height + n - 1 ) / n; } - ras.min_ex = ras.cbox.xMin; - ras.max_ex = ras.cbox.xMax; - for ( y = ras.cbox.yMin; y < ras.cbox.yMax; ) { ras.min_ey = y; y += height; ras.max_ey = FT_MIN( y, ras.cbox.yMax ); + ras.count_ey = ras.max_ey - ras.min_ey; + band = bands; - band[1] = ras.min_ey; - band[0] = ras.max_ey; + band[1] = ras.cbox.xMin; + band[0] = ras.cbox.xMax; do { @@ -1911,10 +1910,8 @@ typedef ptrdiff_t FT_PtrDist; int error; - ras.min_ey = band[1]; - ras.max_ey = band[0]; - - ras.count_ey = ras.max_ey - ras.min_ey; + ras.min_ex = band[1]; + ras.max_ex = band[0]; /* memory management: zero out and skip ycells */ for ( i = 0; i < ras.count_ey; ++i ) From d091bca546fa15928db36c8447e126ee43ddb5f4 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 17 Apr 2024 00:33:14 -0400 Subject: [PATCH 113/191] [cache] Fix error handling. Manipulate the cache after a face is requested or a size is looked up successfully. Fixes #1270. * src/cache/ftcmanag.c (ftc_size_node_init, ftc_size_node_reset, ftc_face_node_init): Check for errors before accepting a change. * src/cache/ftcmru.c (FTC_MruList_New): Do nothing if reset fails. --- src/cache/ftcmanag.c | 38 +++++++++++++++++++++++++++----------- src/cache/ftcmru.c | 8 +++++--- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index dd9bb6190..6b8b80e33 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -118,14 +118,21 @@ FT_Pointer ftcscaler, FT_Pointer ftcmanager ) { + FT_Error error; + FT_Size size; FTC_SizeNode node = (FTC_SizeNode)ftcnode; FTC_Scaler scaler = (FTC_Scaler)ftcscaler; FTC_Manager manager = (FTC_Manager)ftcmanager; - node->scaler = scaler[0]; + error = ftc_scaler_lookup_size( manager, scaler, &size ); + if ( !error ) + { + node->size = size; + node->scaler = scaler[0]; + } - return ftc_scaler_lookup_size( manager, scaler, &node->size ); + return error; } @@ -134,16 +141,23 @@ FT_Pointer ftcscaler, FT_Pointer ftcmanager ) { + FT_Error error; + FT_Size size; FTC_SizeNode node = (FTC_SizeNode)ftcnode; FTC_Scaler scaler = (FTC_Scaler)ftcscaler; FTC_Manager manager = (FTC_Manager)ftcmanager; - FT_Done_Size( node->size ); + error = ftc_scaler_lookup_size( manager, scaler, &size ); + if ( !error ) + { + FT_Done_Size( node->size ); - node->scaler = scaler[0]; + node->size = size; + node->scaler = scaler[0]; + } - return ftc_scaler_lookup_size( manager, scaler, &node->size ); + return error; } @@ -231,23 +245,25 @@ FT_Pointer ftcface_id, FT_Pointer ftcmanager ) { + FT_Error error; + FT_Face face; FTC_FaceNode node = (FTC_FaceNode)ftcnode; FTC_FaceID face_id = (FTC_FaceID)ftcface_id; FTC_Manager manager = (FTC_Manager)ftcmanager; - FT_Error error; - - node->face_id = face_id; error = manager->request_face( face_id, manager->library, manager->request_data, - &node->face ); + &face ); if ( !error ) { /* destroy initial size object; it will be re-created later */ - if ( node->face->size ) - FT_Done_Size( node->face->size ); + if ( face->size ) + FT_Done_Size( face->size ); + + node->face = face; + node->face_id = face_id; } return error; diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c index 7171d4d20..dd23d31a3 100644 --- a/src/cache/ftcmru.c +++ b/src/cache/ftcmru.c @@ -249,11 +249,13 @@ if ( list->clazz.node_reset ) { - FTC_MruNode_Up( &list->nodes, node ); - error = list->clazz.node_reset( node, key, list->data ); if ( !error ) - goto Exit; + FTC_MruNode_Up( &list->nodes, node ); + else + node = NULL; + + goto Exit; } FTC_MruNode_Remove( &list->nodes, node ); From 12adfc212bd2f7560e1e175e66458124f9bd554b Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 17 Apr 2024 15:07:23 +0000 Subject: [PATCH 114/191] [cache] Improve MRU list management. * src/cache/ftcmru.c (FTC_MruList_Remove): Cosmetic. (FTC_MruList_New): Accept only valid changes. * src/cache/ftcmanag.c (ftc_size_node_done): Simplify. --- src/cache/ftcmanag.c | 4 +-- src/cache/ftcmru.c | 64 ++++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index 6b8b80e33..881b460a8 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -86,12 +86,10 @@ FT_Pointer data ) { FTC_SizeNode node = (FTC_SizeNode)ftcnode; - FT_Size size = node->size; FT_UNUSED( data ); - if ( size ) - FT_Done_Size( size ); + FT_Done_Size( node->size ); } diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c index dd23d31a3..a767fa408 100644 --- a/src/cache/ftcmru.c +++ b/src/cache/ftcmru.c @@ -238,54 +238,62 @@ { FT_Error error; FTC_MruNode node = NULL; + FTC_MruNode prev = NULL; FT_Memory memory = list->memory; - if ( list->num_nodes >= list->max_nodes && list->max_nodes > 0 ) + if ( list->max_nodes > 0 && list->num_nodes >= list->max_nodes ) { - node = list->nodes->prev; + prev = list->nodes->prev; - FT_ASSERT( node ); + FT_ASSERT( prev ); + /* try fast reset when available */ if ( list->clazz.node_reset ) { - error = list->clazz.node_reset( node, key, list->data ); + error = list->clazz.node_reset( prev, key, list->data ); if ( !error ) + { + node = prev; + FTC_MruNode_Up( &list->nodes, node ); - else - node = NULL; + } goto Exit; } - - FTC_MruNode_Remove( &list->nodes, node ); - list->num_nodes--; - - if ( list->clazz.node_done ) - list->clazz.node_done( node, list->data ); } /* zero new node in case of node_init failure */ - else if ( FT_ALLOC( node, list->clazz.node_size ) ) + if ( FT_ALLOC( node, list->clazz.node_size ) ) goto Exit; error = list->clazz.node_init( node, key, list->data ); if ( error ) - goto Fail; + { + prev = node; + node = NULL; + + goto Clean; + } FTC_MruNode_Prepend( &list->nodes, node ); list->num_nodes++; - Exit: - *anode = node; - return error; + if ( !prev ) + goto Exit; - Fail: + FTC_MruNode_Remove( &list->nodes, prev ); + list->num_nodes--; + + Clean: if ( list->clazz.node_done ) - list->clazz.node_done( node, list->data ); + list->clazz.node_done( prev, list->data ); - FT_FREE( node ); - goto Exit; + FT_FREE( prev ); + + Exit: + *anode = node; + return error; } @@ -311,18 +319,16 @@ FTC_MruList_Remove( FTC_MruList list, FTC_MruNode node ) { - FTC_MruNode_Remove( &list->nodes, node ); - list->num_nodes--; + FT_Memory memory = list->memory; - { - FT_Memory memory = list->memory; + FTC_MruNode_Remove( &list->nodes, node ); + list->num_nodes--; - if ( list->clazz.node_done ) - list->clazz.node_done( node, list->data ); + if ( list->clazz.node_done ) + list->clazz.node_done( node, list->data ); - FT_FREE( node ); - } + FT_FREE( node ); } From db83e9c0ec8b4ec8d7fa3bb3383d5160d1cfa719 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 18 Apr 2024 23:23:13 -0400 Subject: [PATCH 115/191] * src/cache/ftcglyph.c [!FTC_INLINE]: Fix compilation. --- src/cache/ftcglyph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c index cf7820abd..5e7856378 100644 --- a/src/cache/ftcglyph.c +++ b/src/cache/ftcglyph.c @@ -180,7 +180,7 @@ query->gindex = gindex; - FTC_MRULIST_LOOKUP( &cache->families, query, query->family, error ); + FTC_MRULIST_LOOKUP( &gcache->families, query, query->family, error ); if ( !error ) { FTC_Family family = query->family; @@ -193,7 +193,7 @@ error = FTC_Cache_Lookup( FTC_CACHE( gcache ), hash, query, anode ); if ( --family->num_nodes == 0 ) - FTC_FAMILY_FREE( family, cache ); + FTC_FAMILY_FREE( family, FTC_CACHE( gcache ) ); } return error; } From dbdcd758895647028bbc56baf862a1cff07409ff Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 19 Apr 2024 14:02:43 -0400 Subject: [PATCH 116/191] [cache] Tweak headers. * src/cache/ftccback.h: Include less and move `ftc_node_destroy`... * src/cache/ftccache.h: ... to here. * src/cache/ftcmanag.c: Include less. --- src/cache/ftccache.h | 4 ++++ src/cache/ftccback.h | 10 +--------- src/cache/ftcmanag.c | 1 - 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h index ccbf97980..85d321c12 100644 --- a/src/cache/ftccache.h +++ b/src/cache/ftccache.h @@ -87,6 +87,10 @@ FT_BEGIN_HEADER ftc_get_top_node_for_hash( ( cache ), ( hash ) ) #endif + FT_LOCAL( void ) + ftc_node_destroy( FTC_Node node, + FTC_Manager manager ); + /*************************************************************************/ /*************************************************************************/ diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h index 79ba44ab9..a1d76baa7 100644 --- a/src/cache/ftccback.h +++ b/src/cache/ftccback.h @@ -19,11 +19,7 @@ #define FTCCBACK_H_ #include -#include "ftcmru.h" -#include "ftcimage.h" -#include "ftcmanag.h" -#include "ftcglyph.h" -#include "ftcsbits.h" +#include "ftccache.h" FT_BEGIN_HEADER @@ -81,10 +77,6 @@ FT_BEGIN_HEADER FT_LOCAL( void ) ftc_cache_done( FTC_Cache cache ); - FT_LOCAL( void ) - ftc_node_destroy( FTC_Node node, - FTC_Manager manager ); - FT_END_HEADER #endif /* FTCCBACK_H_ */ diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index 881b460a8..c73601400 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -22,7 +22,6 @@ #include #include -#include "ftccback.h" #include "ftcerror.h" From 9a2d6d97b2d8a5d22d02948b783df12b764afa2d Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 19 Apr 2024 14:45:39 -0400 Subject: [PATCH 117/191] * src/cache/{ftcbasic.c,ftccmap.c}: Use FTC_INLINE. --- src/cache/ftcbasic.c | 4 ++-- src/cache/ftccmap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index b6e13fd7b..742d93515 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -334,7 +334,7 @@ hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex; -#if 1 /* inlining is about 50% faster! */ +#ifdef FTC_INLINE /* inlining is about 50% faster! */ FTC_GCACHE_LOOKUP_CMP( cache, ftc_basic_family_compare, ftc_gnode_compare, @@ -534,7 +534,7 @@ hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex / FTC_SBIT_ITEMS_PER_NODE; -#if 1 /* inlining is about 50% faster! */ +#ifdef FTC_INLINE /* inlining is about 50% faster! */ FTC_GCACHE_LOOKUP_CMP( cache, ftc_basic_family_compare, ftc_snode_compare, diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c index 43c507361..b5c61e816 100644 --- a/src/cache/ftccmap.c +++ b/src/cache/ftccmap.c @@ -264,7 +264,7 @@ hash = FTC_CMAP_HASH( face_id, (FT_UInt)cmap_index, char_code ); -#if 1 +#ifdef FTC_INLINE FTC_CACHE_LOOKUP_CMP( cache, ftc_cmap_node_compare, hash, &query, node, error ); #else From 23e1d6455662a7e9eaf021331e502e7f48003a98 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 20 Apr 2024 12:01:58 -0400 Subject: [PATCH 118/191] [cache] Reduce type mismatches. * src/cache/ftcbasic.c (FTC_BasicAttrRec): Match type of `load_flags` to its main purpose in `FT_Load_Glyph`. (FTC_ImageCache_Lookup{,Scaler},FTC_SBitCache_Lookup{,Scaler}): Updated. --- src/cache/ftcbasic.c | 63 ++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 46 deletions(-) diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 742d93515..10c7b6c41 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -37,7 +37,7 @@ typedef struct FTC_BasicAttrRec_ { FTC_ScalerRec scaler; - FT_UInt load_flags; + FT_Int32 load_flags; } FTC_BasicAttrRec, *FTC_BasicAttrs; @@ -143,10 +143,9 @@ FT_Face face = size->face; - error = FT_Load_Glyph( - face, - gindex, - (FT_Int)family->attrs.load_flags | FT_LOAD_RENDER ); + error = FT_Load_Glyph( face, + gindex, + family->attrs.load_flags | FT_LOAD_RENDER ); if ( !error ) *aface = face; } @@ -176,9 +175,7 @@ { face = size->face; - error = FT_Load_Glyph( face, - gindex, - (FT_Int)family->attrs.load_flags ); + error = FT_Load_Glyph( face, gindex, family->attrs.load_flags ); if ( !error ) { if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP || @@ -310,23 +307,10 @@ if ( anode ) *anode = NULL; - /* - * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt', - * but public `FT_ImageType->flags' is of type `FT_Int32'. - * - * On 16bit systems, higher bits of type->flags cannot be handled. - */ -#if 0xFFFFFFFFUL > FT_UINT_MAX - if ( (type->flags & (FT_ULong)FT_UINT_MAX) ) - FT_TRACE1(( "FTC_ImageCache_Lookup:" - " higher bits in load_flags 0x%lx are dropped\n", - (FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) )); -#endif - query.attrs.scaler.face_id = type->face_id; query.attrs.scaler.width = type->width; query.attrs.scaler.height = type->height; - query.attrs.load_flags = (FT_UInt)type->flags; + query.attrs.load_flags = type->flags; query.attrs.scaler.pixel = 1; query.attrs.scaler.x_res = 0; /* make compilers happy */ @@ -392,20 +376,20 @@ *anode = NULL; /* - * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt', + * Internal `FTC_BasicAttr->load_flags' is of type `FT_Int32', * but public `FT_Face->face_flags' is of type `FT_Long'. * * On long > int systems, higher bits of load_flags cannot be handled. */ -#if FT_ULONG_MAX > FT_UINT_MAX - if ( load_flags > FT_UINT_MAX ) +#if FT_ULONG_MAX > 0xFFFFFFFFUL + if ( load_flags > 0xFFFFFFFFUL ) FT_TRACE1(( "FTC_ImageCache_LookupScaler:" " higher bits in load_flags 0x%lx are dropped\n", - load_flags & ~((FT_ULong)FT_UINT_MAX) )); + load_flags & ~0xFFFFFFFFUL )); #endif query.attrs.scaler = scaler[0]; - query.attrs.load_flags = (FT_UInt)load_flags; + query.attrs.load_flags = (FT_Int32)load_flags; hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex; @@ -508,23 +492,10 @@ *ansbit = NULL; - /* - * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt', - * but public `FT_ImageType->flags' is of type `FT_Int32'. - * - * On 16bit systems, higher bits of type->flags cannot be handled. - */ -#if 0xFFFFFFFFUL > FT_UINT_MAX - if ( (type->flags & (FT_ULong)FT_UINT_MAX) ) - FT_TRACE1(( "FTC_ImageCache_Lookup:" - " higher bits in load_flags 0x%lx are dropped\n", - (FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) )); -#endif - query.attrs.scaler.face_id = type->face_id; query.attrs.scaler.width = type->width; query.attrs.scaler.height = type->height; - query.attrs.load_flags = (FT_UInt)type->flags; + query.attrs.load_flags = type->flags; query.attrs.scaler.pixel = 1; query.attrs.scaler.x_res = 0; /* make compilers happy */ @@ -592,20 +563,20 @@ *ansbit = NULL; /* - * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt', + * Internal `FTC_BasicAttr->load_flags' is of type `FT_Int32', * but public `FT_Face->face_flags' is of type `FT_Long'. * * On long > int systems, higher bits of load_flags cannot be handled. */ -#if FT_ULONG_MAX > FT_UINT_MAX - if ( load_flags > FT_UINT_MAX ) +#if FT_ULONG_MAX > 0xFFFFFFFFUL + if ( load_flags > 0xFFFFFFFFUL ) FT_TRACE1(( "FTC_ImageCache_LookupScaler:" " higher bits in load_flags 0x%lx are dropped\n", - load_flags & ~((FT_ULong)FT_UINT_MAX) )); + load_flags & ~0xFFFFFFFFUL )); #endif query.attrs.scaler = scaler[0]; - query.attrs.load_flags = (FT_UInt)load_flags; + query.attrs.load_flags = (FT_Int32)load_flags; /* beware, the hash must be the same for all glyph ranges! */ hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + From 5a3bfa92d9d23efaf20319cd1dd13857108b55d8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 20 Apr 2024 23:28:17 -0400 Subject: [PATCH 119/191] * src/cache/ftcbasic.c: Cosmetic harmonization. --- src/cache/ftcbasic.c | 44 +++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 10c7b6c41..953b96ebe 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -290,22 +290,19 @@ FT_Glyph *aglyph, FTC_Node *anode ) { - FTC_BasicQueryRec query; - FTC_Node node = 0; /* make compiler happy */ FT_Error error; + FTC_BasicQueryRec query; + FTC_Node node = NULL; /* make compiler happy */ FT_Offset hash; - /* some argument checks are delayed to `FTC_Cache_Lookup' */ + /* other argument checks delayed to `FTC_Cache_Lookup' */ if ( !aglyph ) - { - error = FT_THROW( Invalid_Argument ); - goto Exit; - } + return FT_THROW( Invalid_Argument ); *aglyph = NULL; if ( anode ) - *anode = NULL; + *anode = NULL; query.attrs.scaler.face_id = type->face_id; query.attrs.scaler.width = type->width; @@ -343,7 +340,6 @@ } } - Exit: return error; } @@ -358,22 +354,19 @@ FT_Glyph *aglyph, FTC_Node *anode ) { - FTC_BasicQueryRec query; - FTC_Node node = 0; /* make compiler happy */ FT_Error error; + FTC_BasicQueryRec query; + FTC_Node node = NULL; /* make compiler happy */ FT_Offset hash; - /* some argument checks are delayed to `FTC_Cache_Lookup' */ + /* other argument checks delayed to `FTC_Cache_Lookup' */ if ( !aglyph || !scaler ) - { - error = FT_THROW( Invalid_Argument ); - goto Exit; - } + return FT_THROW( Invalid_Argument ); *aglyph = NULL; if ( anode ) - *anode = NULL; + *anode = NULL; /* * Internal `FTC_BasicAttr->load_flags' is of type `FT_Int32', @@ -411,7 +404,6 @@ } } - Exit: return error; } @@ -479,18 +471,17 @@ { FT_Error error; FTC_BasicQueryRec query; - FTC_Node node = 0; /* make compiler happy */ + FTC_Node node = NULL; /* make compiler happy */ FT_Offset hash; - if ( anode ) - *anode = NULL; - /* other argument checks delayed to `FTC_Cache_Lookup' */ if ( !ansbit ) return FT_THROW( Invalid_Argument ); *ansbit = NULL; + if ( anode ) + *anode = NULL; query.attrs.scaler.face_id = type->face_id; query.attrs.scaler.width = type->width; @@ -549,18 +540,17 @@ { FT_Error error; FTC_BasicQueryRec query; - FTC_Node node = 0; /* make compiler happy */ + FTC_Node node = NULL; /* make compiler happy */ FT_Offset hash; - if ( anode ) - *anode = NULL; - /* other argument checks delayed to `FTC_Cache_Lookup' */ if ( !ansbit || !scaler ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Argument ); *ansbit = NULL; + if ( anode ) + *anode = NULL; /* * Internal `FTC_BasicAttr->load_flags' is of type `FT_Int32', From 982bc83849966554f850fbc91405883a2a0de895 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 21 Apr 2024 15:53:05 -0400 Subject: [PATCH 120/191] [cache] Minor tweaks. * src/cache/ftcimage.c (ftc_inode_free): Remove unnecessary check. * src/cache/ftcmanag.c (FTC_Manager_Done): Do not zero before freeing. --- src/cache/ftcimage.c | 6 +----- src/cache/ftcmanag.c | 5 ----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index 56ff80915..c142dcc8d 100644 --- a/src/cache/ftcimage.c +++ b/src/cache/ftcimage.c @@ -34,11 +34,7 @@ FT_Memory memory = cache->memory; - if ( inode->glyph ) - { - FT_Done_Glyph( inode->glyph ); - inode->glyph = NULL; - } + FT_Done_Glyph( inode->glyph ); FTC_GNode_Done( FTC_GNODE( inode ), cache ); FT_FREE( inode ); diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index c73601400..29a95baa1 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -448,18 +448,13 @@ { cache->clazz.cache_done( cache ); FT_FREE( cache ); - manager->caches[idx] = NULL; } } - manager->num_caches = 0; /* discard faces and sizes */ FTC_MruList_Done( &manager->sizes ); FTC_MruList_Done( &manager->faces ); - manager->library = NULL; - manager->memory = NULL; - FT_FREE( manager ); } From ec46a50dac57845b1ab505275f26025706b9405d Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 22 Apr 2024 21:21:12 -0400 Subject: [PATCH 121/191] Improve SDF documentation. --- include/freetype/freetype.h | 81 +++---------------------------------- include/freetype/ftdriver.h | 73 +++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 75 deletions(-) diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index e3a0435ba..b88ccc608 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -3771,87 +3771,18 @@ FT_BEGIN_HEADER * pixels and use the @FT_PIXEL_MODE_LCD_V mode. * * FT_RENDER_MODE_SDF :: - * This mode corresponds to 8-bit, single-channel signed distance field - * (SDF) bitmaps. Each pixel in the SDF grid is the value from the - * pixel's position to the nearest glyph's outline. The distances are - * calculated from the center of the pixel and are positive if they are - * filled by the outline (i.e., inside the outline) and negative - * otherwise. Check the note below on how to convert the output values - * to usable data. + * The positive (unsigned) 8-bit bitmap values can be converted to the + * single-channel signed distance field (SDF) by subtracting 128, with + * the positive and negative results corresponding to the inside and + * the outside of a glyph contour, respectively. The distance units are + * arbitrarily determined by an adjustable @spread property. * * @note: - * The selected render mode only affects vector glyphs of a font. + * The selected render mode only affects scalable vector glyphs of a font. * Embedded bitmaps often have a different pixel mode like * @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them * into 8-bit pixmaps. * - * For @FT_RENDER_MODE_SDF the output bitmap buffer contains normalized - * distances that are packed into unsigned 8-bit values. To get pixel - * values in floating point representation use the following pseudo-C - * code for the conversion. - * - * ``` - * // Load glyph and render using FT_RENDER_MODE_SDF, - * // then use the output buffer as follows. - * - * ... - * FT_Byte buffer = glyph->bitmap->buffer; - * - * - * for pixel in buffer - * { - * // `sd` is the signed distance and `spread` is the current spread; - * // the default spread is 2 and can be changed. - * - * float sd = (float)pixel - 128.0f; - * - * - * // Convert to pixel values. - * sd = ( sd / 128.0f ) * spread; - * - * // Store `sd` in a buffer or use as required. - * } - * - * ``` - * - * FreeType has two rasterizers for generating SDF, namely: - * - * 1. `sdf` for generating SDF directly from glyph's outline, and - * - * 2. `bsdf` for generating SDF from rasterized bitmaps. - * - * Depending on the glyph type (i.e., outline or bitmap), one of the two - * rasterizers is chosen at runtime and used for generating SDFs. To - * force the use of `bsdf` you should render the glyph with any of the - * FreeType's other rendering modes (e.g., `FT_RENDER_MODE_NORMAL`) and - * then re-render with `FT_RENDER_MODE_SDF`. - * - * There are some issues with stability and possible failures of the SDF - * renderers (specifically `sdf`). - * - * 1. The `sdf` rasterizer is sensitive to really small features (e.g., - * sharp turns that are less than 1~pixel) and imperfections in the - * glyph's outline, causing artifacts in the final output. - * - * 2. The `sdf` rasterizer has limited support for handling intersecting - * contours and *cannot* handle self-intersecting contours whatsoever. - * Self-intersection happens when a single connected contour - * intersects itself at some point; having these in your font - * definitely poses a problem to the rasterizer and cause artifacts, - * too. - * - * 3. Generating SDF for really small glyphs may result in undesirable - * output; the pixel grid (which stores distance information) becomes - * too coarse. - * - * 4. Since the output buffer is normalized, precision at smaller spreads - * is greater than precision at larger spread values because the - * output range of [0..255] gets mapped to a smaller SDF range. A - * spread of~2 should be sufficient in most cases. - * - * Points (1) and (2) can be avoided by using the `bsdf` rasterizer, - * which is more stable than the `sdf` rasterizer in general. - * */ typedef enum FT_Render_Mode_ { diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h index baf15a460..b91affc9b 100644 --- a/include/freetype/ftdriver.h +++ b/include/freetype/ftdriver.h @@ -817,6 +817,79 @@ FT_BEGIN_HEADER * 2.5 */ + + /************************************************************************** + * + * @property: + * spread + * + * @description: + * This property of the 'sdf' and 'bsdf' renderers defines how the signed + * distance field (SDF) is represented in the output bitmap. The output + * values are calculated as follows, '128 * ( SDF / spread + 1 )', with + * the result truncated to the 8-bit range [0..255]. Therefore, 'spread' + * is also the maximum euclidean distance from the edge after which the + * values are truncated. The spread is specified in pixels with the + * default value of 8. + * + * @example: + * The following example code demonstrates how to set the SDF spread + * (omitting the error handling). + * + * ``` + * FT_Library library; + * FT_UInt spread = 2; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "sdf", "spread", &spread ); + * ``` + * + * @note + * FreeType has two rasterizers for generating SDF, namely: + * + * 1. `sdf` for generating SDF directly from glyph's outline, and + * + * 2. `bsdf` for generating SDF from rasterized bitmaps. + * + * Depending on the glyph type (i.e., outline or bitmap), one of the two + * rasterizers is chosen at runtime and used for generating SDFs. To + * force the use of `bsdf` you should render the glyph with any of the + * FreeType's other rendering modes (e.g., `FT_RENDER_MODE_NORMAL`) and + * then re-render with `FT_RENDER_MODE_SDF`. + * + * There are some issues with stability and possible failures of the SDF + * renderers (specifically `sdf`). + * + * 1. The `sdf` rasterizer is sensitive to really small features (e.g., + * sharp turns that are less than 1~pixel) and imperfections in the + * glyph's outline, causing artifacts in the final output. + * + * 2. The `sdf` rasterizer has limited support for handling intersecting + * contours and *cannot* handle self-intersecting contours whatsoever. + * Self-intersection happens when a single connected contour + * intersects itself at some point; having these in your font + * definitely poses a problem to the rasterizer and cause artifacts, + * too. + * + * 3. Generating SDF for really small glyphs may result in undesirable + * output; the pixel grid (which stores distance information) becomes + * too coarse. + * + * 4. Since the output buffer is normalized, precision at smaller spreads + * is greater than precision at larger spread values because the + * output range of [0..255] gets mapped to a smaller SDF range. A + * spread of~2 should be sufficient in most cases. + * + * Points (1) and (2) can be avoided by using the `bsdf` rasterizer, + * which is more stable than the `sdf` rasterizer in general. + * + * @since: + * 2.11 + */ + + /************************************************************************** * * @property: From e2bcca40ca0d82ae64ba25e5c5e252dc0d083162 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 22 Apr 2024 22:43:41 -0400 Subject: [PATCH 122/191] * include/freetype/ftdriver.h: s/truncated/clamped/. --- include/freetype/ftdriver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h index b91affc9b..4c83f7396 100644 --- a/include/freetype/ftdriver.h +++ b/include/freetype/ftdriver.h @@ -827,9 +827,9 @@ FT_BEGIN_HEADER * This property of the 'sdf' and 'bsdf' renderers defines how the signed * distance field (SDF) is represented in the output bitmap. The output * values are calculated as follows, '128 * ( SDF / spread + 1 )', with - * the result truncated to the 8-bit range [0..255]. Therefore, 'spread' + * the result clamped to the 8-bit range [0..255]. Therefore, 'spread' * is also the maximum euclidean distance from the edge after which the - * values are truncated. The spread is specified in pixels with the + * values are clamped. The spread is specified in pixels with the * default value of 8. * * @example: @@ -838,7 +838,7 @@ FT_BEGIN_HEADER * * ``` * FT_Library library; - * FT_UInt spread = 2; + * FT_Int spread = 2; * * * FT_Init_FreeType( &library ); From 4e079f635747433801a02f3bca208e6bd8819381 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 27 Apr 2024 20:07:36 -0400 Subject: [PATCH 123/191] Document the SDF spread further. --- include/freetype/ftdriver.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h index 4c83f7396..dd31626b0 100644 --- a/include/freetype/ftdriver.h +++ b/include/freetype/ftdriver.h @@ -830,7 +830,8 @@ FT_BEGIN_HEADER * the result clamped to the 8-bit range [0..255]. Therefore, 'spread' * is also the maximum euclidean distance from the edge after which the * values are clamped. The spread is specified in pixels with the - * default value of 8. + * default value of 8. For accurate SDF texture mapping (interpolation), + * the spread should be large enough to accommodate the target grid unit. * * @example: * The following example code demonstrates how to set the SDF spread From 1168b1b5b0774b09a7484b150d2d49c682e46e91 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 27 Apr 2024 20:44:01 -0400 Subject: [PATCH 124/191] * src/cache/ftcimage.c (ftc_inode_weight): Formatting. --- src/cache/ftcimage.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index c142dcc8d..146306405 100644 --- a/src/cache/ftcimage.c +++ b/src/cache/ftcimage.c @@ -115,10 +115,9 @@ { case FT_GLYPH_FORMAT_BITMAP: { - FT_BitmapGlyph bitg; + FT_BitmapGlyph bitg = (FT_BitmapGlyph)glyph; - bitg = (FT_BitmapGlyph)glyph; size = bitg->bitmap.rows * (FT_Offset)FT_ABS( bitg->bitmap.pitch ) + sizeof ( *bitg ); } @@ -126,10 +125,9 @@ case FT_GLYPH_FORMAT_OUTLINE: { - FT_OutlineGlyph outg; + FT_OutlineGlyph outg = (FT_OutlineGlyph)glyph; - outg = (FT_OutlineGlyph)glyph; size = (FT_Offset)outg->outline.n_points * ( sizeof ( FT_Vector ) + sizeof ( FT_Byte ) ) + (FT_Offset)outg->outline.n_contours * sizeof ( FT_Short ) + From f8f0d1a1d919bbaec89dbc44e7704cdf8ebd6662 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 29 Apr 2024 16:58:59 -0400 Subject: [PATCH 125/191] * src/cache/ftcmru.c (FTC_MruList_New): Do not reset nodes. Resetting of the size nodes can crash, if a parent face purge happens simultaneously and destroys the node. It is safer to create a new node. Fixes #1270, reopened with a separate issue. --- src/cache/ftcmru.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c index a767fa408..f908eb25a 100644 --- a/src/cache/ftcmru.c +++ b/src/cache/ftcmru.c @@ -242,27 +242,6 @@ FT_Memory memory = list->memory; - if ( list->max_nodes > 0 && list->num_nodes >= list->max_nodes ) - { - prev = list->nodes->prev; - - FT_ASSERT( prev ); - - /* try fast reset when available */ - if ( list->clazz.node_reset ) - { - error = list->clazz.node_reset( prev, key, list->data ); - if ( !error ) - { - node = prev; - - FTC_MruNode_Up( &list->nodes, node ); - } - - goto Exit; - } - } - /* zero new node in case of node_init failure */ if ( FT_ALLOC( node, list->clazz.node_size ) ) goto Exit; @@ -275,6 +254,8 @@ goto Clean; } + else if ( list->max_nodes > 0 && list->num_nodes >= list->max_nodes ) + prev = list->nodes->prev; FTC_MruNode_Prepend( &list->nodes, node ); list->num_nodes++; From a209e1adcd7d8d4fffe2c8412a02ecb8846d0171 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 29 Apr 2024 17:54:30 -0400 Subject: [PATCH 126/191] [cache] Remove unused `node_reset`. * src/cache/ftcmru.h (FTC_MruListClassRec): Remove `node_reset` field. * src/cache/ftcbasic.c (ftc_basic_{image,sbit}_family_class): Ditto. * src/cache/ftcmanag.c (ftc_face_list_class): Ditto. (ftc_size_node_reset): Remove function. * src/cache/ftcglyph.h: Fix comment. --- src/cache/ftcbasic.c | 2 -- src/cache/ftcglyph.h | 1 - src/cache/ftcmanag.c | 27 --------------------------- src/cache/ftcmru.h | 6 ------ 4 files changed, 36 deletions(-) diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 953b96ebe..04f664fad 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -243,7 +243,6 @@ ftc_basic_family_compare, /* FTC_MruNode_CompareFunc node_compare */ ftc_basic_family_init, /* FTC_MruNode_InitFunc node_init */ - NULL, /* FTC_MruNode_ResetFunc node_reset */ NULL /* FTC_MruNode_DoneFunc node_done */ }, @@ -421,7 +420,6 @@ sizeof ( FTC_BasicFamilyRec ), ftc_basic_family_compare, /* FTC_MruNode_CompareFunc node_compare */ ftc_basic_family_init, /* FTC_MruNode_InitFunc node_init */ - NULL, /* FTC_MruNode_ResetFunc node_reset */ NULL /* FTC_MruNode_DoneFunc node_done */ }, diff --git a/src/cache/ftcglyph.h b/src/cache/ftcglyph.h index 66a1bc77e..b1a96da8e 100644 --- a/src/cache/ftcglyph.h +++ b/src/cache/ftcglyph.h @@ -65,7 +65,6 @@ * - FTC_Family sub-class, e.g. MyFamily, with relevant methods: * my_family_compare * my_family_init - * my_family_reset (optional) * my_family_done * * - FTC_GQuery sub-class, e.g. MyQuery, to hold cache-specific query diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index 29a95baa1..c0a48a53b 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -133,31 +133,6 @@ } - FT_CALLBACK_DEF( FT_Error ) - ftc_size_node_reset( FTC_MruNode ftcnode, - FT_Pointer ftcscaler, - FT_Pointer ftcmanager ) - { - FT_Error error; - FT_Size size; - FTC_SizeNode node = (FTC_SizeNode)ftcnode; - FTC_Scaler scaler = (FTC_Scaler)ftcscaler; - FTC_Manager manager = (FTC_Manager)ftcmanager; - - - error = ftc_scaler_lookup_size( manager, scaler, &size ); - if ( !error ) - { - FT_Done_Size( node->size ); - - node->size = size; - node->scaler = scaler[0]; - } - - return error; - } - - static const FTC_MruListClassRec ftc_size_list_class = { @@ -165,7 +140,6 @@ ftc_size_node_compare, /* FTC_MruNode_CompareFunc node_compare */ ftc_size_node_init, /* FTC_MruNode_InitFunc node_init */ - ftc_size_node_reset, /* FTC_MruNode_ResetFunc node_reset */ ftc_size_node_done /* FTC_MruNode_DoneFunc node_done */ }; @@ -307,7 +281,6 @@ ftc_face_node_compare, /* FTC_MruNode_CompareFunc node_compare */ ftc_face_node_init, /* FTC_MruNode_InitFunc node_init */ - NULL, /* FTC_MruNode_ResetFunc node_reset */ ftc_face_node_done /* FTC_MruNode_DoneFunc node_done */ }; diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h index abafea3ae..68faab984 100644 --- a/src/cache/ftcmru.h +++ b/src/cache/ftcmru.h @@ -95,11 +95,6 @@ FT_BEGIN_HEADER FT_Pointer key, FT_Pointer data ); - typedef FT_Error - (*FTC_MruNode_ResetFunc)( FTC_MruNode node, - FT_Pointer key, - FT_Pointer data ); - typedef void (*FTC_MruNode_DoneFunc)( FTC_MruNode node, FT_Pointer data ); @@ -111,7 +106,6 @@ FT_BEGIN_HEADER FTC_MruNode_CompareFunc node_compare; FTC_MruNode_InitFunc node_init; - FTC_MruNode_ResetFunc node_reset; FTC_MruNode_DoneFunc node_done; } FTC_MruListClassRec; From 5962d3c1b928fa49980e795590c2263f949b8a07 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 29 Apr 2024 22:34:09 -0400 Subject: [PATCH 127/191] * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Remove nodes instantly. --- src/cache/ftccache.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c index 33a03486d..8a3d887f9 100644 --- a/src/cache/ftccache.c +++ b/src/cache/ftccache.c @@ -544,7 +544,6 @@ FTC_FaceID face_id ) { FTC_Manager manager = cache->manager; - FTC_Node frees = NULL; FT_UFast count = cache->p; FT_UFast i; @@ -557,41 +556,27 @@ for (;;) { FTC_Node node = *pnode; - FT_Bool list_changed = FALSE; if ( !node ) break; - if ( cache->clazz.node_remove_faceid( node, face_id, - cache, &list_changed ) ) + if ( cache->clazz.node_remove_faceid( node, face_id, cache, NULL ) ) { - *pnode = node->link; - node->link = frees; - frees = node; + *pnode = node->link; + + manager->cur_weight -= cache->clazz.node_weight( node, cache ); + ftc_node_mru_unlink( node, manager ); + + cache->clazz.node_free( node, cache ); + + cache->slack++; } else pnode = &node->link; } } - /* remove all nodes in the free list */ - while ( frees ) - { - FTC_Node node; - - - node = frees; - frees = node->link; - - manager->cur_weight -= cache->clazz.node_weight( node, cache ); - ftc_node_mru_unlink( node, manager ); - - cache->clazz.node_free( node, cache ); - - cache->slack++; - } - ftc_cache_resize( cache ); } From 2c9691e7c176be180114cd2889ed0b5147e7c6e1 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 30 Apr 2024 12:59:52 +0000 Subject: [PATCH 128/191] * docs/CHANGES: Updated. --- docs/CHANGES | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGES b/docs/CHANGES index cbf3cc93a..555c8ac7c 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,7 +1,9 @@ -CHANGES BETWEEN 2.13.2 and 2.13.3 (202Y-Mmm-DD) +CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Mmm-DD) I. IMPORTANT BUG FIXES + - Rare double-free crashes in the cache subsystem have been fixed. + - Excessive stack allocation in the autohinter has been fixed. From 13da9042676e6ff824c725f490b7559194f7dc9c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 1 May 2024 00:34:21 -0400 Subject: [PATCH 129/191] * src/sfnt/sfwoff2.c (compute_ULong_sum): Clean up. --- src/sfnt/sfwoff2.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index f3c9e2854..1ddbb247e 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -289,7 +289,6 @@ FT_ULong checksum = 0; FT_ULong aligned_size = size & ~3UL; FT_ULong i; - FT_ULong v; for ( i = 0; i < aligned_size; i += 4 ) @@ -298,14 +297,9 @@ ( (FT_ULong)buf[i + 2] << 8 ) | ( (FT_ULong)buf[i + 3] << 0 ); - /* If size is not aligned to 4, treat as if it is padded with 0s. */ - if ( size != aligned_size ) - { - v = 0; - for ( i = aligned_size ; i < size; ++i ) - v |= (FT_ULong)buf[i] << ( 24 - 8 * ( i & 3 ) ); - checksum += v; - } + /* remaining bytes can be shifted and added one at a time */ + for ( ; i < size; ++i ) + checksum += (FT_ULong)buf[i] << ( 24 - 8 * ( i & 3 ) ); return checksum; } From 4d504684789dc6f8f452aaa4df04f96f31082345 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 1 May 2024 23:19:31 -0400 Subject: [PATCH 130/191] [sfnt] Use faster macros in checksums. * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Use FT_NEXT_XXX. * src/sfnt/sfwoff2.c (compute_ULong_sum): Use macros. --- src/sfnt/sfwoff2.c | 10 ++++------ src/truetype/ttobjs.c | 11 +++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index 1ddbb247e..3df4d2664 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -289,17 +289,15 @@ FT_ULong checksum = 0; FT_ULong aligned_size = size & ~3UL; FT_ULong i; + FT_Int shift; for ( i = 0; i < aligned_size; i += 4 ) - checksum += ( (FT_ULong)buf[i ] << 24 ) | - ( (FT_ULong)buf[i + 1] << 16 ) | - ( (FT_ULong)buf[i + 2] << 8 ) | - ( (FT_ULong)buf[i + 3] << 0 ); + checksum += FT_NEXT_ULONG( buf ); /* remaining bytes can be shifted and added one at a time */ - for ( ; i < size; ++i ) - checksum += (FT_ULong)buf[i] << ( 24 - 8 * ( i & 3 ) ); + for ( shift = 24; i < size; i++, shift -= 8 ) + checksum += (FT_UInt32)FT_NEXT_BYTE( buf ) << shift; return checksum; } diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 3cdbfff1b..05489d732 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -256,17 +256,20 @@ { FT_Error error; FT_UInt32 checksum = 0; - FT_UInt i; + FT_Byte* p; + FT_Int shift; if ( FT_FRAME_ENTER( length ) ) return 0; + p = (FT_Byte*)stream->cursor; + for ( ; length > 3; length -= 4 ) - checksum += (FT_UInt32)FT_GET_ULONG(); + checksum += FT_NEXT_ULONG( p ); - for ( i = 3; length > 0; length--, i-- ) - checksum += (FT_UInt32)FT_GET_BYTE() << ( i * 8 ); + for ( shift = 24; length > 0; length--, shift -=8 ) + checksum += (FT_UInt32)FT_NEXT_BYTE( p ) << shift; FT_FRAME_EXIT(); From 13d1180f4542d19557e146cc0124e51891733b0c Mon Sep 17 00:00:00 2001 From: Ben Wanger Date: Thu, 2 May 2024 13:16:46 -0400 Subject: [PATCH 131/191] [woff2] Disallow zero table font entries The existing code already disallows zero table woff2 overall, but still allows for individual CollectionFontEntry to create font instances with zero tables. Such fonts are not useful so error early. This also fixes an MSAN discovered issue where if a CollectionFontEntry numTables is zero then the sfnt_header was not fully initialized. * src/sfnt/sfwoff2.c (woff2_open_font): error on zero tables, always initalize sfnt_header Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68384 --- src/sfnt/sfwoff2.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index 3df4d2664..0e272fc99 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -1791,7 +1791,6 @@ FT_Byte* sfnt = NULL; FT_Stream sfnt_stream = NULL; - FT_Byte* sfnt_header; FT_ULong sfnt_size; FT_Byte* uncompressed_buf = NULL; @@ -2135,6 +2134,13 @@ WOFF2_TtcFont ttc_font = woff2.ttc_fonts + face_index; + if ( ttc_font->num_tables == 0 ) + { + FT_ERROR(( "woff2_open_font: invalid WOFF2 CollectionFontEntry\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + /* Create a temporary array. */ if ( FT_QNEW_ARRAY( temp_indices, ttc_font->num_tables ) ) @@ -2190,13 +2196,9 @@ FT_NEW( sfnt_stream ) ) goto Exit; - sfnt_header = sfnt; - - WRITE_ULONG( sfnt_header, woff2.flavor ); - - if ( woff2.num_tables ) { - FT_UInt searchRange, entrySelector, rangeShift, x; + FT_UInt searchRange, entrySelector, rangeShift, x; + FT_Byte* sfnt_header = sfnt; x = woff2.num_tables; @@ -2211,6 +2213,7 @@ searchRange = ( 1 << entrySelector ) * 16; rangeShift = ( woff2.num_tables * 16 ) - searchRange; + WRITE_ULONG( sfnt_header, woff2.flavor ); WRITE_USHORT( sfnt_header, woff2.num_tables ); WRITE_USHORT( sfnt_header, searchRange ); WRITE_USHORT( sfnt_header, entrySelector ); From 3f28a6b6afed06a7eeaeefb7e319e6c23bdd3eb8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 3 May 2024 15:44:57 +0000 Subject: [PATCH 132/191] [woff,woff2] Limit the number of tables and use FT_MSB. The upper limit of 4095 is implied by the SFNT header format where the multiplication by 16 would overflow without it. * src/sfnt/sfwoff.c (woff_open_font): Updated. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. --- src/sfnt/sfwoff.c | 18 +++++------------- src/sfnt/sfwoff2.c | 21 +++++++-------------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/src/sfnt/sfwoff.c b/src/sfnt/sfwoff.c index 8d33b7133..14514bf95 100644 --- a/src/sfnt/sfwoff.c +++ b/src/sfnt/sfwoff.c @@ -18,6 +18,7 @@ #include "sfwoff.h" #include +#include #include #include #include @@ -149,6 +150,7 @@ /* Miscellaneous checks. */ if ( woff.length != stream->size || woff.num_tables == 0 || + woff.num_tables > 0xFFFU || 44 + woff.num_tables * 20UL >= woff.length || 12 + woff.num_tables * 16UL >= woff.totalSfntSize || ( woff.totalSfntSize & 3 ) != 0 || @@ -169,21 +171,11 @@ /* Write sfnt header. */ { - FT_UInt searchRange, entrySelector, rangeShift, x; + FT_Int entrySelector = FT_MSB( woff.num_tables ); + FT_Int searchRange = ( 1 << entrySelector ) * 16; + FT_Int rangeShift = woff.num_tables * 16 - searchRange; - x = woff.num_tables; - entrySelector = 0; - while ( x ) - { - x >>= 1; - entrySelector += 1; - } - entrySelector--; - - searchRange = ( 1 << entrySelector ) * 16; - rangeShift = woff.num_tables * 16 - searchRange; - WRITE_ULONG ( sfnt_header, woff.flavor ); WRITE_USHORT( sfnt_header, woff.num_tables ); WRITE_USHORT( sfnt_header, searchRange ); diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index 0e272fc99..bc7a55d79 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -18,6 +18,7 @@ #include "sfwoff2.h" #include "woff2tags.h" #include +#include #include #include @@ -1844,6 +1845,7 @@ /* Miscellaneous checks. */ if ( woff2.length != stream->size || woff2.num_tables == 0 || + woff2.num_tables > 0xFFFU || 48 + woff2.num_tables * 20UL >= woff2.length || ( woff2.metaOffset == 0 && ( woff2.metaLength != 0 || woff2.metaOrigLength != 0 ) ) || @@ -2134,7 +2136,7 @@ WOFF2_TtcFont ttc_font = woff2.ttc_fonts + face_index; - if ( ttc_font->num_tables == 0 ) + if ( ttc_font->num_tables == 0 || ttc_font->num_tables > 0xFFFU ) { FT_ERROR(( "woff2_open_font: invalid WOFF2 CollectionFontEntry\n" )); error = FT_THROW( Invalid_Table ); @@ -2197,23 +2199,14 @@ goto Exit; { - FT_UInt searchRange, entrySelector, rangeShift, x; FT_Byte* sfnt_header = sfnt; + FT_Int entrySelector = FT_MSB( woff.num_tables ); + FT_Int searchRange = ( 1 << entrySelector ) * 16; + FT_Int rangeShift = woff.num_tables * 16 - searchRange; - x = woff2.num_tables; - entrySelector = 0; - while ( x ) - { - x >>= 1; - entrySelector += 1; - } - entrySelector--; - - searchRange = ( 1 << entrySelector ) * 16; - rangeShift = ( woff2.num_tables * 16 ) - searchRange; - WRITE_ULONG( sfnt_header, woff2.flavor ); + WRITE_ULONG ( sfnt_header, woff2.flavor ); WRITE_USHORT( sfnt_header, woff2.num_tables ); WRITE_USHORT( sfnt_header, searchRange ); WRITE_USHORT( sfnt_header, entrySelector ); From 7bd887f177b765165ecf7c443b8d0bab88034df0 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 3 May 2024 16:04:35 +0000 Subject: [PATCH 133/191] * src/sfnt/sfwoff2.c (woff2_open_font): Fix copy-paste typo. --- src/sfnt/sfwoff2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c index bc7a55d79..589b3e0c6 100644 --- a/src/sfnt/sfwoff2.c +++ b/src/sfnt/sfwoff2.c @@ -2201,9 +2201,9 @@ { FT_Byte* sfnt_header = sfnt; - FT_Int entrySelector = FT_MSB( woff.num_tables ); + FT_Int entrySelector = FT_MSB( woff2.num_tables ); FT_Int searchRange = ( 1 << entrySelector ) * 16; - FT_Int rangeShift = woff.num_tables * 16 - searchRange; + FT_Int rangeShift = woff2.num_tables * 16 - searchRange; WRITE_ULONG ( sfnt_header, woff2.flavor ); From 2edfd7e1687c311e695b1645b0e7f6df6e2b5406 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 4 May 2024 16:42:47 -0400 Subject: [PATCH 134/191] * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Remove FT_ABS. See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68679 --- src/autofit/aflatin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 316e7c676..89287f7ea 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -1263,10 +1263,9 @@ max_height = FT_MAX( max_height, -Axis->blues[nn].descender ); } - dist = FT_ABS( FT_MulFix( max_height, new_scale - scale ) ); - dist &= ~127; + dist = FT_MulFix( max_height, new_scale - scale ); - if ( dist == 0 ) + if ( -128 < dist && dist < 128 ) { FT_TRACE5(( "af_latin_metrics_scale_dim:" " x height alignment (style `%s'):\n", From d0e3239f32a0fe71c234cf2c1ce7a90cb11b64bb Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 6 May 2024 13:39:06 +0000 Subject: [PATCH 135/191] [sdf, bsdf] Use shared FT_SqrtFixed. FT_SqrtFixed (95b0fe2a6dff) is faster and does not overflow. * src/sdf/ftsdfcommin.h (square_root): Replace with a macro. * src/sdf/ftsdfcommin.c (square_root): Remove function. --- src/sdf/ftsdfcommon.c | 43 ------------------------------------------- src/sdf/ftsdfcommon.h | 3 +-- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/sdf/ftsdfcommon.c b/src/sdf/ftsdfcommon.c index 5841ded21..6b2cf7dfe 100644 --- a/src/sdf/ftsdfcommon.c +++ b/src/sdf/ftsdfcommon.c @@ -22,49 +22,6 @@ #include "ftsdfcommon.h" - /************************************************************************** - * - * common functions - * - */ - - /* - * Original algorithm: - * - * https://github.com/chmike/fpsqrt - * - * Use this to compute the square root of a 16.16 fixed-point number. - */ - FT_LOCAL_DEF( FT_16D16 ) - square_root( FT_16D16 val ) - { - FT_ULong t, q, b, r; - - - r = (FT_ULong)val; - b = 0x40000000L; - q = 0; - - while ( b > 0x40L ) - { - t = q + b; - - if ( r >= t ) - { - r -= t; - q = t + b; - } - - r <<= 1; - b >>= 1; - } - - q >>= 8; - - return (FT_16D16)q; - } - - /************************************************************************** * * format and sign manipulating functions diff --git a/src/sdf/ftsdfcommon.h b/src/sdf/ftsdfcommon.h index 44274e349..d0f623f9f 100644 --- a/src/sdf/ftsdfcommon.h +++ b/src/sdf/ftsdfcommon.h @@ -122,8 +122,7 @@ FT_BEGIN_HEADER typedef FT_BBox FT_CBox; /* control box of a curve */ - FT_LOCAL( FT_16D16 ) - square_root( FT_16D16 val ); +#define square_root( x ) (FT_16D16)FT_SqrtFixed( (FT_UInt32)( x ) ) FT_LOCAL( FT_SDFFormat ) map_fixed_to_sdf( FT_16D16 dist, From 2240e21cf5073e69442ae42519f5486014bd7d5d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 6 May 2024 21:53:24 +0200 Subject: [PATCH 136/191] .mailmap: Fix entry for Ben Wagner. --- .mailmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 9c7d08f88..31d2a4766 100644 --- a/.mailmap +++ b/.mailmap @@ -19,7 +19,7 @@ Anurag Thakur (अनà¥à¤°à¤¾à¤— ठाकà¥à¤°) David Turner David Turner Anuj Verma (अनà¥à¤œ वरà¥à¤®à¤¾) -Ben Wagner Bungeman +Ben Wagner Ben Wagner Ben Wagner Nikolaus Waxweiler From 5858fa16cace81fb7b3de7600cb765a820348bed Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Tue, 7 May 2024 18:19:58 -0400 Subject: [PATCH 137/191] [colr] Avoid overflow in range checks In 32 bit builds `FT_ULong` is 32 bits and can silently overflow when a large number is read into one and then it is summed or multiplied with another number. Checks for range overflow must be written so that they themselves do not overflow. Also ensure that the table_size is always the first part of the range check and consistently use `<` or `<=`. * src/sfnt/ttcolr.c (tt_face_load_colr): Avoid overflow. (find_base_glyph_v1_record): Remove old work-around. Bug: https://issues.chromium.org/issues/41495455 Bug: https://issues.chromium.org/issues/40945818 --- src/sfnt/ttcolr.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c index 1c3fd70d0..b37658dde 100644 --- a/src/sfnt/ttcolr.c +++ b/src/sfnt/ttcolr.c @@ -208,18 +208,19 @@ colr->num_base_glyphs = FT_NEXT_USHORT( p ); base_glyph_offset = FT_NEXT_ULONG( p ); - if ( base_glyph_offset >= table_size ) + if ( table_size <= base_glyph_offset ) goto InvalidTable; - if ( colr->num_base_glyphs * BASE_GLYPH_SIZE > - table_size - base_glyph_offset ) + if ( ( table_size - base_glyph_offset ) / BASE_GLYPH_SIZE + < colr->num_base_glyphs ) goto InvalidTable; layer_offset = FT_NEXT_ULONG( p ); colr->num_layers = FT_NEXT_USHORT( p ); - if ( layer_offset >= table_size ) + if ( table_size <= layer_offset ) goto InvalidTable; - if ( colr->num_layers * LAYER_SIZE > table_size - layer_offset ) + if ( ( table_size - layer_offset ) / LAYER_SIZE + < colr->num_layers ) goto InvalidTable; if ( colr->version == 1 ) @@ -229,14 +230,14 @@ base_glyphs_offset_v1 = FT_NEXT_ULONG( p ); - if ( base_glyphs_offset_v1 >= table_size - 4 ) + if ( table_size - 4 <= base_glyphs_offset_v1 ) goto InvalidTable; p1 = (FT_Byte*)( table + base_glyphs_offset_v1 ); num_base_glyphs_v1 = FT_PEEK_ULONG( p1 ); - if ( num_base_glyphs_v1 * BASE_GLYPH_PAINT_RECORD_SIZE > - table_size - base_glyphs_offset_v1 ) + if ( ( table_size - base_glyphs_offset_v1 ) / BASE_GLYPH_PAINT_RECORD_SIZE + < num_base_glyphs_v1 ) goto InvalidTable; colr->num_base_glyphs_v1 = num_base_glyphs_v1; @@ -244,19 +245,19 @@ layer_offset_v1 = FT_NEXT_ULONG( p ); - if ( layer_offset_v1 >= table_size ) + if ( table_size <= layer_offset_v1 ) goto InvalidTable; if ( layer_offset_v1 ) { - if ( layer_offset_v1 >= table_size - 4 ) + if ( table_size - 4 <= layer_offset_v1 ) goto InvalidTable; p1 = (FT_Byte*)( table + layer_offset_v1 ); num_layers_v1 = FT_PEEK_ULONG( p1 ); - if ( num_layers_v1 * LAYER_V1_LIST_PAINT_OFFSET_SIZE > - table_size - layer_offset_v1 ) + if ( ( table_size - layer_offset_v1 ) / LAYER_V1_LIST_PAINT_OFFSET_SIZE + < num_layers_v1 ) goto InvalidTable; colr->num_layers_v1 = num_layers_v1; @@ -279,7 +280,7 @@ clip_list_offset = FT_NEXT_ULONG( p ); - if ( clip_list_offset >= table_size ) + if ( table_size <= clip_list_offset ) goto InvalidTable; if ( clip_list_offset ) @@ -311,7 +312,7 @@ goto InvalidTable; var_store_offset = FT_NEXT_ULONG( p ); - if ( var_store_offset >= table_size ) + if ( table_size <= var_store_offset ) goto InvalidTable; if ( var_store_offset ) @@ -1270,7 +1271,6 @@ static FT_Bool find_base_glyph_v1_record( FT_Byte * base_glyph_begin, FT_UInt num_base_glyph, - FT_Byte * end_colr, FT_UInt glyph_id, BaseGlyphV1Record *record ) { @@ -1290,14 +1290,6 @@ */ FT_Byte *p = base_glyph_begin + 4 + mid * BASE_GLYPH_PAINT_RECORD_SIZE; - - /* We need to be able to read 2 bytes (FT_NEXT_USHORT) for the glyph */ - /* ID, then 4 bytes (FT_NEXT_ULONG) for the paint offset. If that's */ - /* not available before the end of the table, something's wrong with */ - /* the font and we can't find a COLRv1 glyph. */ - if ( p > end_colr - 2 - 4 ) - return 0; - gid = FT_NEXT_USHORT( p ); if ( gid < glyph_id ) @@ -1338,7 +1330,6 @@ if ( !find_base_glyph_v1_record( colr->base_glyphs_v1, colr->num_base_glyphs_v1, - (FT_Byte*)colr->table + colr->table_size, base_glyph, &base_glyph_v1_record ) ) return 0; From 1264b84c08a31d11303fe3781444f6f026ea60b8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 7 May 2024 23:35:59 -0400 Subject: [PATCH 138/191] * include/freetype/internal/psaux.h: Fix g++ warning. Reported by Hin-Tak Leung. --- include/freetype/internal/psaux.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index 41f481d5a..fffa103ca 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -225,6 +225,7 @@ FT_BEGIN_HEADER typedef enum T1_FieldLocation_ { + T1_FIELD_LOCATION_NONE = 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_LOCATION_FONT_DICT, T1_FIELD_LOCATION_FONT_EXTRA, @@ -359,7 +360,12 @@ FT_BEGIN_HEADER #define T1_FIELD_CALLBACK( _ident, _name, _dict ) \ T1_NEW_CALLBACK_FIELD( _ident, _name, _dict ) -#define T1_FIELD_ZERO { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 } +#define T1_FIELD_ZERO \ + { \ + 0, \ + NULL, T1_FIELD_TYPE_NONE, T1_FIELD_LOCATION_NONE, \ + NULL, 0, 0, 0, 0, 0 \ + } /*************************************************************************/ From a46424228f0998a72c715f32e18dca8a7a764c1f Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 8 May 2024 11:33:47 -0400 Subject: [PATCH 139/191] [psaux] Fix location and type order in initializer `T1_FIELD_ZERO` is used to zero initialize a `T1_FieldRec`. `T1_FIELD_ZERO` is currently initilizing `T1_FieldRec::location` with a `T1_FieldType` and `T1_FieldRec::type` with a `T1_FieldLocation`. This was detected with `-Wenum-conversion`. * include/freetype/internal/psaux.h (T1_FIELD_ZERO): correct order of initalizers --- include/freetype/internal/psaux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index fffa103ca..745d2cb56 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -363,7 +363,7 @@ FT_BEGIN_HEADER #define T1_FIELD_ZERO \ { \ 0, \ - NULL, T1_FIELD_TYPE_NONE, T1_FIELD_LOCATION_NONE, \ + NULL, T1_FIELD_LOCATION_NONE, T1_FIELD_TYPE_NONE, \ NULL, 0, 0, 0, 0, 0 \ } From b875924a6fc176d46fc9f82c616db631fc4d665c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 10 May 2024 23:01:23 -0400 Subject: [PATCH 140/191] * src/pshinter/pshrec.c (ps_hints_stem): Correct argument. --- src/pshinter/pshrec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index b10c70ec9..0b2b549fc 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -806,7 +806,7 @@ ps_hints_stem( PS_Hints hints, FT_UInt dimension, FT_Int count, - FT_Long* stems ) + FT_Pos* stems ) { PS_Dimension dim; From 4a85db7e3181f23126af6c4473b245e48f6b1902 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 11 May 2024 22:19:25 -0400 Subject: [PATCH 141/191] [type1/MM] Tighten headers. * include/freetype/internal/t1types.h: Host PS_DesignMap and PS_Blend. * include/freetype/ftmm.h: Host and document TT_MAX_MM_XXX. * include/freetype/t1tables.h: Remove them from here. --- include/freetype/ftmm.h | 27 ++++++++++++-- include/freetype/internal/t1types.h | 50 ++++++++++++++++++++++++- include/freetype/t1tables.h | 58 ----------------------------- 3 files changed, 73 insertions(+), 62 deletions(-) diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h index a6e3e34fb..a85d0be43 100644 --- a/include/freetype/ftmm.h +++ b/include/freetype/ftmm.h @@ -20,9 +20,6 @@ #define FTMM_H_ -#include - - FT_BEGIN_HEADER @@ -53,6 +50,30 @@ FT_BEGIN_HEADER */ + /************************************************************************** + * + * @enum: + * T1_MAX_MM_XXX + * + * @description: + * Multiple Masters limits as defined in their specifications. + * + * @values: + * T1_MAX_MM_AXIS :: + * The maximum number of Multiple Masters axes. + * + * T1_MAX_MM_DESIGNS :: + * The maximum number of Multiple Masters designs. + * + * T1_MAX_MM_MAP_POINTS :: + * The maximum number of elements in a design map. + * + */ +#define T1_MAX_MM_AXIS 4 +#define T1_MAX_MM_DESIGNS 16 +#define T1_MAX_MM_MAP_POINTS 20 + + /************************************************************************** * * @struct: diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h index be63e4dcf..1821ae5cc 100644 --- a/include/freetype/internal/t1types.h +++ b/include/freetype/internal/t1types.h @@ -21,7 +21,7 @@ #define T1TYPES_H_ -#include +#include #include #include #include @@ -137,6 +137,54 @@ FT_BEGIN_HEADER } CID_SubrsRec, *CID_Subrs; + /* this structure is used to store the BlendDesignMap entry for an axis */ + typedef struct PS_DesignMap_ + { + FT_Byte num_points; + FT_Long* design_points; + FT_Fixed* blend_points; + + } PS_DesignMapRec, *PS_DesignMap; + + /* backward compatible definition */ + typedef PS_DesignMapRec T1_DesignMap; + + + typedef struct PS_BlendRec_ + { + FT_UInt num_designs; + FT_UInt num_axis; + + FT_String* axis_names[T1_MAX_MM_AXIS]; + FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; + PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; + + FT_Fixed* weight_vector; + FT_Fixed* default_weight_vector; + + PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; + PS_Private privates [T1_MAX_MM_DESIGNS + 1]; + + FT_ULong blend_bitflags; + + FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; + + /* since 2.3.0 */ + + /* undocumented, optional: the default design instance; */ + /* corresponds to default_weight_vector -- */ + /* num_default_design_vector == 0 means it is not present */ + /* in the font and associated metrics files */ + FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; + FT_UInt num_default_design_vector; + + } PS_BlendRec, *PS_Blend; + + + /* backward compatible definition */ + typedef PS_BlendRec T1_Blend; + + /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h index 8a1b10593..fbd558aa3 100644 --- a/include/freetype/t1tables.h +++ b/include/freetype/t1tables.h @@ -269,64 +269,6 @@ FT_BEGIN_HEADER /* */ - /* maximum number of Multiple Masters designs, as defined in the spec */ -#define T1_MAX_MM_DESIGNS 16 - - /* maximum number of Multiple Masters axes, as defined in the spec */ -#define T1_MAX_MM_AXIS 4 - - /* maximum number of elements in a design map */ -#define T1_MAX_MM_MAP_POINTS 20 - - - /* this structure is used to store the BlendDesignMap entry for an axis */ - typedef struct PS_DesignMap_ - { - FT_Byte num_points; - FT_Long* design_points; - FT_Fixed* blend_points; - - } PS_DesignMapRec, *PS_DesignMap; - - /* backward compatible definition */ - typedef PS_DesignMapRec T1_DesignMap; - - - typedef struct PS_BlendRec_ - { - FT_UInt num_designs; - FT_UInt num_axis; - - FT_String* axis_names[T1_MAX_MM_AXIS]; - FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; - PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; - - FT_Fixed* weight_vector; - FT_Fixed* default_weight_vector; - - PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; - PS_Private privates [T1_MAX_MM_DESIGNS + 1]; - - FT_ULong blend_bitflags; - - FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; - - /* since 2.3.0 */ - - /* undocumented, optional: the default design instance; */ - /* corresponds to default_weight_vector -- */ - /* num_default_design_vector == 0 means it is not present */ - /* in the font and associated metrics files */ - FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; - FT_UInt num_default_design_vector; - - } PS_BlendRec, *PS_Blend; - - - /* backward compatible definition */ - typedef PS_BlendRec T1_Blend; - - /************************************************************************** * * @struct: From e834786b34673d553d3e757b4210dd5b48b71d40 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 11 May 2024 23:25:37 -0400 Subject: [PATCH 142/191] * docs/CHANGES: Mention the last commit. --- docs/CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CHANGES b/docs/CHANGES index 555c8ac7c..fc18eb10a 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -23,6 +23,10 @@ CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Mmm-DD) Code contributed by David Saltzman . + - The internal structures `PS_DesignMap` and `PS_Blend` related to + parsing of old Multiple Masters fonts have been removed from the + public header file `t1tables.h`. + ====================================================================== From 5b1cde804da66ce0074be7a96dd7732a47972e4a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 11 May 2024 23:27:34 -0400 Subject: [PATCH 143/191] * src/type1/t1load.c (parse_blend_design_map): Add risky cast. --- src/type1/t1load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 7f63898fc..c41348c78 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1045,7 +1045,7 @@ /* allocate design map data */ if ( FT_QNEW_ARRAY( map->design_points, num_points * 2 ) ) goto Exit; - map->blend_points = map->design_points + num_points; + map->blend_points = (FT_Fixed*)(map->design_points + num_points); map->num_points = (FT_Byte)num_points; for ( p = 0; p < num_points; p++ ) From b8db819768b16ac4e529a4e4c34b2c5fa83cc389 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 12 May 2024 22:38:38 -0400 Subject: [PATCH 144/191] [type1/MM] Safer handle arrays of different types. * src/type1/t1load.c (parse_blend_design_map): Separately allocate... (T1_Done_Blend): ... and free `design_points` and `blend_points`. --- src/type1/t1load.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/type1/t1load.c b/src/type1/t1load.c index c41348c78..1704d1375 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -751,6 +751,7 @@ PS_DesignMap dmap = blend->design_map + n; + FT_FREE( dmap->blend_points ); FT_FREE( dmap->design_points ); dmap->num_points = 0; } @@ -1043,9 +1044,9 @@ } /* allocate design map data */ - if ( FT_QNEW_ARRAY( map->design_points, num_points * 2 ) ) + if ( FT_QNEW_ARRAY( map->design_points, num_points ) || + FT_QNEW_ARRAY( map->blend_points, num_points ) ) goto Exit; - map->blend_points = (FT_Fixed*)(map->design_points + num_points); map->num_points = (FT_Byte)num_points; for ( p = 0; p < num_points; p++ ) From 68399b4244d85a1acc18ce669176b531b2eb7e32 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 13 May 2024 16:57:35 +0000 Subject: [PATCH 145/191] * include/freetype/ftmm.h: Include `freetype.h`. Reported by Ben Wagner, see !326. --- include/freetype/ftmm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h index a85d0be43..35ed039c8 100644 --- a/include/freetype/ftmm.h +++ b/include/freetype/ftmm.h @@ -19,6 +19,14 @@ #ifndef FTMM_H_ #define FTMM_H_ +#include + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + FT_BEGIN_HEADER From cdd3572e52aba43823b93b7ba08076e90e7a7576 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 17 May 2024 22:25:00 -0400 Subject: [PATCH 146/191] * builds/windows/ftsystem.c: Use _WINRT_DLL to check for UWP. Fixes compilation using Windows GDK, reported by Erin Melucci. --- builds/windows/ftsystem.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/builds/windows/ftsystem.c b/builds/windows/ftsystem.c index 3a56834f6..477cad71f 100644 --- a/builds/windows/ftsystem.c +++ b/builds/windows/ftsystem.c @@ -196,8 +196,8 @@ } - /* non-desktop Universal Windows Platform */ -#if defined( WINAPI_FAMILY ) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP + /* support for Universal Windows Platform UWP, formerly WinRT */ +#ifdef _WINRT_DLL #define PACK_DWORD64( hi, lo ) ( ( (DWORD64)(hi) << 32 ) | (DWORD)(lo) ) @@ -248,10 +248,11 @@ dwCreationDisposition, &createExParams ); } -#endif +#endif /* _WINRT_DLL */ -#if defined( _WIN32_WCE ) + /* support for Windows CE */ +#ifdef _WIN32_WCE /* malloc.h provides implementation of alloca()/_alloca() */ #include @@ -291,9 +292,9 @@ dwFlagsAndAttributes, hTemplateFile ); } -#endif - +#endif /* _WIN32_WCE */ + /* support for really old Windows */ #if defined( _WIN32_WCE ) || defined ( _WIN32_WINDOWS ) || \ !defined( _WIN32_WINNT ) || _WIN32_WINNT <= 0x0400 @@ -311,7 +312,7 @@ return TRUE; } -#endif +#endif /* _WIN32_WCE || _WIN32_WINDOWS || _WIN32_WINNT <= 0x0400 */ /* documentation is in ftobjs.h */ From d7cf931ac699f6bc0d9d681d78c7a9a488c74449 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 19 May 2024 22:48:13 -0400 Subject: [PATCH 147/191] [truetype, type1] Use FT_DUP to duplicate data. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use concise FT_DUP. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ditto. * src/type1/t1load.c (parse_subrs): Ditto. --- src/truetype/ttgload.c | 4 +--- src/truetype/ttgxvar.c | 3 +-- src/type1/t1load.c | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index df803a0f3..b7d8e1d66 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -418,11 +418,9 @@ /* and thus allocate the bytecode array size by ourselves */ if ( n_ins ) { - if ( FT_QNEW_ARRAY( exec->glyphIns, n_ins ) ) + if ( FT_DUP( exec->glyphIns, p, n_ins ) ) return error; - FT_MEM_COPY( exec->glyphIns, p, (FT_Long)n_ins ); - exec->glyphSize = n_ins; } } diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 7b33b8e52..99a9d4db0 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -2722,9 +2722,8 @@ FT_UInt n; - if ( FT_ALLOC( mmvar, ttface->blend->mmvar_len ) ) + if ( FT_DUP( mmvar, ttface->blend->mmvar, ttface->blend->mmvar_len ) ) goto Exit; - FT_MEM_COPY( mmvar, ttface->blend->mmvar, ttface->blend->mmvar_len ); axis_flags = (FT_UShort*)( (char*)mmvar + mmvar_size ); diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 1704d1375..ee7fb42a5 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1877,9 +1877,8 @@ } /* t1_decrypt() shouldn't write to base -- make temporary copy */ - if ( FT_QALLOC( temp, size ) ) + if ( FT_DUP( temp, base, size ) ) goto Fail; - FT_MEM_COPY( temp, base, size ); psaux->t1_decrypt( temp, size, 4330 ); size -= (FT_ULong)t1face->type1.private_dict.lenIV; error = T1_Add_Table( table, @@ -2091,9 +2090,8 @@ } /* t1_decrypt() shouldn't write to base -- make temporary copy */ - if ( FT_QALLOC( temp, size ) ) + if ( FT_DUP( temp, base, size ) ) goto Fail; - FT_MEM_COPY( temp, base, size ); psaux->t1_decrypt( temp, size, 4330 ); size -= (FT_ULong)t1face->type1.private_dict.lenIV; error = T1_Add_Table( code_table, From 026fd5d4f032845eae070b0899d64a6acc51018f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 19 May 2024 22:54:57 -0400 Subject: [PATCH 148/191] [cache] Use FT_DUP to duplicate data. * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Use concise FT_MEM_DUP. --- src/cache/ftcsbits.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index c8548744b..19f3ef04d 100644 --- a/src/cache/ftcsbits.c +++ b/src/cache/ftcsbits.c @@ -53,8 +53,7 @@ size = (FT_ULong)pitch * bitmap->rows; - if ( !FT_QALLOC( sbit->buffer, size ) ) - FT_MEM_COPY( sbit->buffer, bitmap->buffer, size ); + FT_MEM_DUP( sbit->buffer, bitmap->buffer, size ); return error; } From b25265fe553c3420148bfa42bed4e2832558df85 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 19 May 2024 22:58:23 -0400 Subject: [PATCH 149/191] [bdf] Use concise macros. * src/bdf/bdflib.c (bdf_create_property): Use FT_STRDUP. (bdf_parse_glyphs_, bdf_parse_start_): Use FT_DUP for brevity. --- src/bdf/bdflib.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index 0fa7e0a8c..813a4d839 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -864,15 +864,9 @@ p = font->user_props + font->nuser_props; - n = ft_strlen( name ) + 1; - if ( n > FT_LONG_MAX ) - return FT_THROW( Invalid_Argument ); - - if ( FT_QALLOC( p->name, n ) ) + if ( FT_STRDUP( p->name, name ) ) goto Exit; - FT_MEM_COPY( (char *)p->name, name, n ); - p->format = format; p->builtin = 0; p->value.atom = NULL; /* nothing is ever stored here */ @@ -1442,11 +1436,9 @@ goto Exit; } - if ( FT_QALLOC( p->glyph_name, slen + 1 ) ) + if ( FT_DUP( p->glyph_name, s, slen + 1 ) ) goto Exit; - FT_MEM_COPY( p->glyph_name, s, slen + 1 ); - p->flags |= BDF_GLYPH_; FT_TRACE4(( DBGMSG1, lineno, s )); @@ -2051,9 +2043,8 @@ /* Allowing multiple `FONT' lines (which is invalid) doesn't hurt... */ FT_FREE( p->font->name ); - if ( FT_QALLOC( p->font->name, slen + 1 ) ) + if ( FT_DUP( p->font->name, s, slen + 1 ) ) goto Exit; - FT_MEM_COPY( p->font->name, s, slen + 1 ); /* If the font name is an XLFD name, set the spacing to the one in */ /* the font name. If there is no spacing fall back on the default. */ From 4ccdc9f98291fe40c2e32cc9914e327810d845ec Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 20 May 2024 18:53:57 -0400 Subject: [PATCH 150/191] [cff] Optimize the blend vector computations. * src/cff/cffload.c (cff_blend_build_vector): Use FT_MulDiv and skip multiplying by 1. --- src/cff/cffload.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/cff/cffload.c b/src/cff/cffload.c index a23fa4d12..d4f1ef5ff 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -1495,44 +1495,41 @@ for ( j = 0; j < lenNDV; j++ ) { CFF_AxisCoords* axis = &varRegion->axisList[j]; - FT_Fixed axisScalar; /* compute the scalar contribution of this axis; */ /* ignore invalid ranges */ if ( axis->startCoord > axis->peakCoord || axis->peakCoord > axis->endCoord ) - axisScalar = FT_FIXED_ONE; + continue; else if ( axis->startCoord < 0 && axis->endCoord > 0 && axis->peakCoord != 0 ) - axisScalar = FT_FIXED_ONE; + continue; /* peak of 0 means ignore this axis */ else if ( axis->peakCoord == 0 ) - axisScalar = FT_FIXED_ONE; + continue; /* ignore this region if coords are out of range */ else if ( NDV[j] < axis->startCoord || NDV[j] > axis->endCoord ) - axisScalar = 0; - - /* calculate a proportional factor */ - else { - if ( NDV[j] == axis->peakCoord ) - axisScalar = FT_FIXED_ONE; - else if ( NDV[j] < axis->peakCoord ) - axisScalar = FT_DivFix( NDV[j] - axis->startCoord, - axis->peakCoord - axis->startCoord ); - else - axisScalar = FT_DivFix( axis->endCoord - NDV[j], - axis->endCoord - axis->peakCoord ); + blend->BV[master] = 0; + break; } - /* take product of all the axis scalars */ - blend->BV[master] = FT_MulFix( blend->BV[master], axisScalar ); + /* adjust proportionally */ + else if ( NDV[j] < axis->peakCoord ) + blend->BV[master] = FT_MulDiv( blend->BV[master], + NDV[j] - axis->startCoord, + axis->peakCoord - axis->startCoord ); + + else if ( NDV[j] > axis->peakCoord ) + blend->BV[master] = FT_MulDiv( blend->BV[master], + axis->endCoord - NDV[j], + axis->endCoord - axis->peakCoord ); } FT_TRACE4(( ", %f ", From 39f2fbf80c5ab9ad7b380080395c987f4922a038 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 20 May 2024 22:47:14 -0400 Subject: [PATCH 151/191] * src/truetype/ttgxvar.c (tt_var_get_item_delta): Minor refactoring. --- src/truetype/ttgxvar.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 99a9d4db0..a2715860e 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -1074,6 +1074,9 @@ /* inner loop steps through axes in this region */ for ( j = 0; j < itemStore->axisCount; j++, axis++ ) { + FT_Fixed ncv = ttface->blend->normalizedcoords[j]; + + /* compute the scalar contribution of this axis; */ /* ignore invalid ranges */ if ( axis->startCoord > axis->peakCoord || @@ -1089,28 +1092,23 @@ else if ( axis->peakCoord == 0 ) continue; - else if ( ttface->blend->normalizedcoords[j] == axis->peakCoord ) - continue; - /* ignore this region if coords are out of range */ - else if ( ttface->blend->normalizedcoords[j] <= axis->startCoord || - ttface->blend->normalizedcoords[j] >= axis->endCoord ) + else if ( ncv <= axis->startCoord || + ncv >= axis->endCoord ) { scalar = 0; break; } /* cumulative product of all the axis scalars */ - else if ( ttface->blend->normalizedcoords[j] < axis->peakCoord ) - scalar = - FT_MulDiv( scalar, - ttface->blend->normalizedcoords[j] - axis->startCoord, - axis->peakCoord - axis->startCoord ); - else - scalar = - FT_MulDiv( scalar, - axis->endCoord - ttface->blend->normalizedcoords[j], - axis->endCoord - axis->peakCoord ); + else if ( ncv < axis->peakCoord ) + scalar = FT_MulDiv( scalar, + ncv - axis->startCoord, + axis->peakCoord - axis->startCoord ); + else if ( ncv > axis->peakCoord ) + scalar = FT_MulDiv( scalar, + axis->endCoord - ncv, + axis->endCoord - axis->peakCoord ); } /* per-axis loop */ From 347276c1f6dcbc0eed3f0880b3695167a91c205d Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 May 2024 13:12:45 +0000 Subject: [PATCH 152/191] * src/truetype/ttgxvar.c (tt_var_get_item_delta): Align with specs. --- src/truetype/ttgxvar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index a2715860e..886a90546 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -1093,8 +1093,8 @@ continue; /* ignore this region if coords are out of range */ - else if ( ncv <= axis->startCoord || - ncv >= axis->endCoord ) + else if ( ncv < axis->startCoord || + ncv > axis->endCoord ) { scalar = 0; break; From 99be2b315425f51184f23fde2a3c12b528c6a612 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 May 2024 18:26:09 +0000 Subject: [PATCH 153/191] [cff, truetype] Rearrange variation range checks. This should achieve quicker results for common cases. * src/cff/cffload.c (cff_blend_build_vector): Rearrange conditionals. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Ditto. --- src/cff/cffload.c | 22 ++++++++++------------ src/truetype/ttgxvar.c | 21 ++++++++++----------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/cff/cffload.c b/src/cff/cffload.c index d4f1ef5ff..01d78770b 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -1497,24 +1497,23 @@ CFF_AxisCoords* axis = &varRegion->axisList[j]; - /* compute the scalar contribution of this axis; */ - /* ignore invalid ranges */ - if ( axis->startCoord > axis->peakCoord || - axis->peakCoord > axis->endCoord ) + /* compute the scalar contribution of this axis */ + /* while running mandatory range checks */ + if ( axis->peakCoord == NDV[j] || + axis->peakCoord == 0 ) continue; else if ( axis->startCoord < 0 && - axis->endCoord > 0 && - axis->peakCoord != 0 ) + axis->endCoord > 0 ) continue; - /* peak of 0 means ignore this axis */ - else if ( axis->peakCoord == 0 ) + else if ( axis->startCoord > axis->peakCoord || + axis->peakCoord > axis->endCoord ) continue; /* ignore this region if coords are out of range */ - else if ( NDV[j] < axis->startCoord || - NDV[j] > axis->endCoord ) + else if ( NDV[j] <= axis->startCoord || + NDV[j] >= axis->endCoord ) { blend->BV[master] = 0; break; @@ -1525,8 +1524,7 @@ blend->BV[master] = FT_MulDiv( blend->BV[master], NDV[j] - axis->startCoord, axis->peakCoord - axis->startCoord ); - - else if ( NDV[j] > axis->peakCoord ) + else /* NDV[j] > axis->peakCoord ) */ blend->BV[master] = FT_MulDiv( blend->BV[master], axis->endCoord - NDV[j], axis->endCoord - axis->peakCoord ); diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 886a90546..2e0cc7539 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -1077,24 +1077,23 @@ FT_Fixed ncv = ttface->blend->normalizedcoords[j]; - /* compute the scalar contribution of this axis; */ - /* ignore invalid ranges */ - if ( axis->startCoord > axis->peakCoord || - axis->peakCoord > axis->endCoord ) + /* compute the scalar contribution of this axis */ + /* while running mandatory range checks */ + if ( axis->peakCoord == ncv || + axis->peakCoord == 0 ) continue; else if ( axis->startCoord < 0 && - axis->endCoord > 0 && - axis->peakCoord != 0 ) + axis->endCoord > 0 ) continue; - /* peak of 0 means ignore this axis */ - else if ( axis->peakCoord == 0 ) + else if ( axis->startCoord > axis->peakCoord || + axis->peakCoord > axis->endCoord ) continue; /* ignore this region if coords are out of range */ - else if ( ncv < axis->startCoord || - ncv > axis->endCoord ) + else if ( ncv <= axis->startCoord || + ncv >= axis->endCoord ) { scalar = 0; break; @@ -1105,7 +1104,7 @@ scalar = FT_MulDiv( scalar, ncv - axis->startCoord, axis->peakCoord - axis->startCoord ); - else if ( ncv > axis->peakCoord ) + else /* ncv > axis->peakCoord */ scalar = FT_MulDiv( scalar, axis->endCoord - ncv, axis->endCoord - axis->peakCoord ); From 5f131cfd20135ac5a1609854a1c2bde425741d3e Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 21 May 2024 16:24:43 -0400 Subject: [PATCH 154/191] [cff, truetype] Validate variation axes immediately. Instead of validating variation axes in every access, OpenType specs suggest that peak = 0 be used to tag invalid ranges. This implements just that once during loading. * src/cff/cffload.c (cff_blend_build_vector): Move the range checks... (cff_vstore_load): ... here. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Ditto... (tt_var_load_item_variation_store): ... ditto. --- src/cff/cffload.c | 28 ++++++++++++---------------- src/truetype/ttgxvar.c | 16 ++++++---------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/cff/cffload.c b/src/cff/cffload.c index 01d78770b..979fd45f6 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -1202,17 +1202,21 @@ { CFF_AxisCoords* axis = ®ion->axisList[j]; - FT_Int16 start14, peak14, end14; + FT_Int start, peak, end; - if ( FT_READ_SHORT( start14 ) || - FT_READ_SHORT( peak14 ) || - FT_READ_SHORT( end14 ) ) + if ( FT_READ_SHORT( start ) || + FT_READ_SHORT( peak ) || + FT_READ_SHORT( end ) ) goto Exit; - axis->startCoord = FT_fdot14ToFixed( start14 ); - axis->peakCoord = FT_fdot14ToFixed( peak14 ); - axis->endCoord = FT_fdot14ToFixed( end14 ); + /* immediately tag invalid ranges with special peak = 0 */ + if ( ( start < 0 && end > 0 ) || start > peak || peak > end ) + peak = 0; + + axis->startCoord = FT_fdot14ToFixed( start ); + axis->peakCoord = FT_fdot14ToFixed( peak ); + axis->endCoord = FT_fdot14ToFixed( end ); } } @@ -1498,19 +1502,11 @@ /* compute the scalar contribution of this axis */ - /* while running mandatory range checks */ + /* with peak of 0 used for invalid axes */ if ( axis->peakCoord == NDV[j] || axis->peakCoord == 0 ) continue; - else if ( axis->startCoord < 0 && - axis->endCoord > 0 ) - continue; - - else if ( axis->startCoord > axis->peakCoord || - axis->peakCoord > axis->endCoord ) - continue; - /* ignore this region if coords are out of range */ else if ( NDV[j] <= axis->startCoord || NDV[j] >= axis->endCoord ) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 2e0cc7539..205310d13 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -596,7 +596,7 @@ for ( j = 0; j < itemStore->axisCount; j++ ) { - FT_Short start, peak, end; + FT_Int start, peak, end; if ( FT_READ_SHORT( start ) || @@ -604,6 +604,10 @@ FT_READ_SHORT( end ) ) goto Exit; + /* immediately tag invalid ranges with special peak = 0 */ + if ( ( start < 0 && end > 0 ) || start > peak || peak > end ) + peak = 0; + axisCoords[j].startCoord = FT_fdot14ToFixed( start ); axisCoords[j].peakCoord = FT_fdot14ToFixed( peak ); axisCoords[j].endCoord = FT_fdot14ToFixed( end ); @@ -1078,19 +1082,11 @@ /* compute the scalar contribution of this axis */ - /* while running mandatory range checks */ + /* with peak of 0 used for invalid axes */ if ( axis->peakCoord == ncv || axis->peakCoord == 0 ) continue; - else if ( axis->startCoord < 0 && - axis->endCoord > 0 ) - continue; - - else if ( axis->startCoord > axis->peakCoord || - axis->peakCoord > axis->endCoord ) - continue; - /* ignore this region if coords are out of range */ else if ( ncv <= axis->startCoord || ncv >= axis->endCoord ) From 42d406ab04e7f8e626eaac26ea515a795891c3b3 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 22 May 2024 21:08:34 -0400 Subject: [PATCH 155/191] * include/freetype/internal/ftmemory.h (FT_MEM_DUP): Fix g++ error. --- include/freetype/internal/ftmemory.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h index 202cd0a7f..4e05a29f1 100644 --- a/include/freetype/internal/ftmemory.h +++ b/include/freetype/internal/ftmemory.h @@ -371,8 +371,11 @@ extern "C++" #define FT_STRDUP( dst, str ) \ FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) ) -#define FT_MEM_DUP( dst, address, size ) \ - (dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error ) +#define FT_MEM_DUP( dst, address, size ) \ + FT_ASSIGNP_INNER( dst, ft_mem_dup( memory, \ + (address), \ + (FT_ULong)(size), \ + &error ) ) #define FT_DUP( dst, address, size ) \ FT_MEM_SET_ERROR( FT_MEM_DUP( dst, address, size ) ) From a498873652fd5a36a18b8b692ea7f87b47d06e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexei=20Podtelezhnikov=20=28=D0=90=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=B4=D1=82=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=B6=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=29?= Date: Wed, 22 May 2024 22:17:50 -0400 Subject: [PATCH 156/191] * .gitlab-ci.yml: Disable UWP compilation. --- .gitlab-ci.yml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index faa0cd48a..3592724e1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,17 +54,7 @@ variables: # Make sure meson is up to date so we don't need to rebuild the image # with each release. - pip3 install -U 'meson==0.59.*' - - pip3 install --upgrade certifi - pip3 install -U ninja - - # Generate a UWP cross-file in case it's used - - $PSDefaultParameterValues['Out-File:Encoding'] = 'ASCII' - - echo "[binaries]" > uwp-crossfile.meson - - echo "c = 'cl'" >> uwp-crossfile.meson - - echo "strip = ['true']" >> uwp-crossfile.meson - - echo "[built-in options]" >> uwp-crossfile.meson - - echo "c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP', '-DUNICODE', '-D_WIN32_WINNT=0x0A00', '-we4013']" >> uwp-crossfile.meson - - echo "c_winlibs = ['windowsapp.lib']" >> uwp-crossfile.meson script: # For some reason, options are separated by newlines instead of spaces, # so we have to replace them first. @@ -75,10 +65,12 @@ variables: # script. Environment variables substitutions is done by PowerShell # before calling `cmd.exe`, that's why we use `$env:FOO` instead of # `%FOO%`. - - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH $env:VS_UWP && - meson setup build $env:MESON_ARGS_WINDOWS $env:MESON_ARGS_UWP && - meson compile --verbose -C build - $env:MESON_WINDOWS_TESTS" + - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && + meson setup build $env:MESON_ARGS_WINDOWS && + meson compile --verbose -C build && + meson test -C build && + meson test -C build --benchmark" + .build windows msbuild: extends: '.build windows common' @@ -106,20 +98,11 @@ windows meson vs2019 amd64: extends: '.build windows meson' variables: ARCH: 'amd64' - MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark' windows meson vs2019 x86: extends: '.build windows meson' variables: ARCH: 'x86' - MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark' - -windows meson vs2019 amd64 uwp: - extends: '.build windows meson' - variables: - ARCH: 'amd64' - VS_UWP: '-app_platform=UWP' - MESON_ARGS_UWP: '--cross-file uwp-crossfile.meson -Dc_winlibs="windowsapp.lib"' windows msbuild vs2019 amd64: extends: '.build windows msbuild' From 9ff4153cbfd60491f11bb56905ce6e20e94d23c7 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 22 May 2024 23:38:34 -0400 Subject: [PATCH 157/191] [truetype] Reduce allocation scope. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Reduce scope of `points_org` and 'points_out`. --- src/truetype/ttgxvar.c | 45 +++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 205310d13..0ca6cd678 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -4079,10 +4079,6 @@ FT_UInt glyph_index = loader->glyph_index; FT_UInt n_points = (FT_UInt)outline->n_points + 4; - FT_Vector* points_org = NULL; /* coordinates in 16.16 format */ - FT_Vector* points_out = NULL; /* coordinates in 16.16 format */ - FT_Bool* has_delta = NULL; - FT_ULong glyph_start; FT_UInt tupleCount; @@ -4129,17 +4125,12 @@ return FT_Err_Ok; } - if ( FT_NEW_ARRAY( points_org, n_points ) || - FT_NEW_ARRAY( points_out, n_points ) || - FT_NEW_ARRAY( has_delta, n_points ) ) - goto Fail1; - dataSize = blend->glyphoffsets[glyph_index + 1] - blend->glyphoffsets[glyph_index]; if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] ) || FT_FRAME_ENTER( dataSize ) ) - goto Fail1; + return error; glyph_start = FT_Stream_FTell( stream ); @@ -4189,12 +4180,6 @@ FT_NEW_ARRAY( point_deltas_y, n_points ) ) goto Fail3; - for ( j = 0; j < n_points; j++ ) - { - points_org[j].x = FT_intToFixed( outline->points[j].x ); - points_org[j].y = FT_intToFixed( outline->points[j].y ); - } - for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ ) { FT_UInt tupleDataSize; @@ -4324,19 +4309,30 @@ else { + FT_Vector* points_org = NULL; /* coordinates in 16.16 format */ + FT_Vector* points_out = NULL; /* coordinates in 16.16 format */ + FT_Bool* has_delta = NULL; + #ifdef FT_DEBUG_LEVEL_TRACE int count = 0; #endif - /* we have to interpolate the missing deltas similar to the */ - /* IUP bytecode instruction */ + /* note that `has_delta` is set to FALSE, zeroed out */ + if ( FT_QNEW_ARRAY( points_org, n_points ) || + FT_QNEW_ARRAY( points_out, n_points ) || + FT_NEW_ARRAY( has_delta, n_points ) ) + goto Fail4; + for ( j = 0; j < n_points; j++ ) { - has_delta[j] = FALSE; - points_out[j] = points_org[j]; + points_org[j].x = FT_intToFixed( outline->points[j].x ); + points_org[j].y = FT_intToFixed( outline->points[j].y ); } + FT_ARRAY_COPY( points_out, points_org, n_points ); + /* we have to interpolate the missing deltas similar to the */ + /* IUP bytecode instruction */ for ( j = 0; j < point_count; j++ ) { FT_UShort idx = points[j]; @@ -4394,6 +4390,10 @@ if ( !count ) FT_TRACE7(( " none\n" )); #endif + Fail4: + FT_FREE( points_org ); + FT_FREE( points_out ); + FT_FREE( has_delta ); } if ( localpoints != ALL_POINTS ) @@ -4466,11 +4466,6 @@ FT_FRAME_EXIT(); - Fail1: - FT_FREE( points_org ); - FT_FREE( points_out ); - FT_FREE( has_delta ); - return error; } From 70299c924fc6782edf0249bd28ca234dcc9d7c2c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 23 May 2024 22:50:32 -0400 Subject: [PATCH 158/191] Revert "[truetype] Reduce allocation scope." This reverts commit 9ff4153cbfd60491f11bb56905ce6e20e94d23c7. --- src/truetype/ttgxvar.c | 45 +++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 0ca6cd678..205310d13 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -4079,6 +4079,10 @@ FT_UInt glyph_index = loader->glyph_index; FT_UInt n_points = (FT_UInt)outline->n_points + 4; + FT_Vector* points_org = NULL; /* coordinates in 16.16 format */ + FT_Vector* points_out = NULL; /* coordinates in 16.16 format */ + FT_Bool* has_delta = NULL; + FT_ULong glyph_start; FT_UInt tupleCount; @@ -4125,12 +4129,17 @@ return FT_Err_Ok; } + if ( FT_NEW_ARRAY( points_org, n_points ) || + FT_NEW_ARRAY( points_out, n_points ) || + FT_NEW_ARRAY( has_delta, n_points ) ) + goto Fail1; + dataSize = blend->glyphoffsets[glyph_index + 1] - blend->glyphoffsets[glyph_index]; if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] ) || FT_FRAME_ENTER( dataSize ) ) - return error; + goto Fail1; glyph_start = FT_Stream_FTell( stream ); @@ -4180,6 +4189,12 @@ FT_NEW_ARRAY( point_deltas_y, n_points ) ) goto Fail3; + for ( j = 0; j < n_points; j++ ) + { + points_org[j].x = FT_intToFixed( outline->points[j].x ); + points_org[j].y = FT_intToFixed( outline->points[j].y ); + } + for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ ) { FT_UInt tupleDataSize; @@ -4309,30 +4324,19 @@ else { - FT_Vector* points_org = NULL; /* coordinates in 16.16 format */ - FT_Vector* points_out = NULL; /* coordinates in 16.16 format */ - FT_Bool* has_delta = NULL; - #ifdef FT_DEBUG_LEVEL_TRACE int count = 0; #endif - /* note that `has_delta` is set to FALSE, zeroed out */ - if ( FT_QNEW_ARRAY( points_org, n_points ) || - FT_QNEW_ARRAY( points_out, n_points ) || - FT_NEW_ARRAY( has_delta, n_points ) ) - goto Fail4; - + /* we have to interpolate the missing deltas similar to the */ + /* IUP bytecode instruction */ for ( j = 0; j < n_points; j++ ) { - points_org[j].x = FT_intToFixed( outline->points[j].x ); - points_org[j].y = FT_intToFixed( outline->points[j].y ); + has_delta[j] = FALSE; + points_out[j] = points_org[j]; } - FT_ARRAY_COPY( points_out, points_org, n_points ); - /* we have to interpolate the missing deltas similar to the */ - /* IUP bytecode instruction */ for ( j = 0; j < point_count; j++ ) { FT_UShort idx = points[j]; @@ -4390,10 +4394,6 @@ if ( !count ) FT_TRACE7(( " none\n" )); #endif - Fail4: - FT_FREE( points_org ); - FT_FREE( points_out ); - FT_FREE( has_delta ); } if ( localpoints != ALL_POINTS ) @@ -4466,6 +4466,11 @@ FT_FRAME_EXIT(); + Fail1: + FT_FREE( points_org ); + FT_FREE( points_out ); + FT_FREE( has_delta ); + return error; } From b6dbbd963097afd9f90cc02f1c6c6d2b98ca4fd4 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 24 May 2024 17:38:14 +0000 Subject: [PATCH 159/191] * src/truetype/ttgxvar.c (ft_var_apply_tuple): Reduce checks. --- src/truetype/ttgxvar.c | 61 +++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 205310d13..8f2a9b807 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -1913,60 +1913,55 @@ for ( i = 0; i < blend->num_axis; i++ ) { - FT_TRACE6(( " axis %d coordinate %.5f:\n", - i, (double)blend->normalizedcoords[i] / 65536 )); + FT_Fixed ncv = blend->normalizedcoords[i]; + + + FT_TRACE6(( " axis %d coordinate %.5f:\n", i, (double)ncv / 65536 )); /* It's not clear why (for intermediate tuples) we don't need */ /* to check against start/end -- the documentation says we don't. */ /* Similarly, it's unclear why we don't need to scale along the */ /* axis. */ - if ( tuple_coords[i] == 0 ) - { - FT_TRACE6(( " tuple coordinate is zero, ignore\n" )); - continue; - } - - if ( blend->normalizedcoords[i] == 0 ) - { - FT_TRACE6(( " axis coordinate is zero, stop\n" )); - apply = 0; - break; - } - - if ( blend->normalizedcoords[i] == tuple_coords[i] ) - { + if ( tuple_coords[i] == ncv ) + { FT_TRACE6(( " tuple coordinate %.5f fits perfectly\n", (double)tuple_coords[i] / 65536 )); /* `apply' does not change */ continue; } + if ( tuple_coords[i] == 0 ) + { + FT_TRACE6(( " tuple coordinate is zero, ignore\n" )); + continue; + } + if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) ) - { + { /* not an intermediate tuple */ - - if ( blend->normalizedcoords[i] < FT_MIN( 0, tuple_coords[i] ) || - blend->normalizedcoords[i] > FT_MAX( 0, tuple_coords[i] ) ) + + if ( ( tuple_coords[i] > ncv && ncv > 0 ) || + ( tuple_coords[i] < ncv && ncv < 0 ) ) + { + FT_TRACE6(( " tuple coordinate %.5f fits\n", + (double)tuple_coords[i] / 65536 )); + apply = FT_MulDiv( apply, ncv, tuple_coords[i] ); + } + else { FT_TRACE6(( " tuple coordinate %.5f is exceeded, stop\n", (double)tuple_coords[i] / 65536 )); apply = 0; break; } - - FT_TRACE6(( " tuple coordinate %.5f fits\n", - (double)tuple_coords[i] / 65536 )); - apply = FT_MulDiv( apply, - blend->normalizedcoords[i], - tuple_coords[i] ); } else { /* intermediate tuple */ - if ( blend->normalizedcoords[i] <= im_start_coords[i] || - blend->normalizedcoords[i] >= im_end_coords[i] ) + if ( ncv <= im_start_coords[i] || + ncv >= im_end_coords[i] ) { FT_TRACE6(( " intermediate tuple range ]%.5f;%.5f[ is exceeded," " stop\n", @@ -1979,13 +1974,13 @@ FT_TRACE6(( " intermediate tuple range ]%.5f;%.5f[ fits\n", (double)im_start_coords[i] / 65536, (double)im_end_coords[i] / 65536 )); - if ( blend->normalizedcoords[i] < tuple_coords[i] ) + if ( ncv < tuple_coords[i] ) apply = FT_MulDiv( apply, - blend->normalizedcoords[i] - im_start_coords[i], + ncv - im_start_coords[i], tuple_coords[i] - im_start_coords[i] ); - else + else /* ncv > tuple_coords[i] */ apply = FT_MulDiv( apply, - im_end_coords[i] - blend->normalizedcoords[i], + im_end_coords[i] - ncv, im_end_coords[i] - tuple_coords[i] ); } } From 3416ac16d09dcc20478906bd222b73d5375e4db1 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 26 May 2024 08:10:21 -0400 Subject: [PATCH 160/191] Whitespace. --- src/truetype/ttgxvar.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 8f2a9b807..a73dc719a 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -1924,7 +1924,7 @@ /* axis. */ if ( tuple_coords[i] == ncv ) - { + { FT_TRACE6(( " tuple coordinate %.5f fits perfectly\n", (double)tuple_coords[i] / 65536 )); /* `apply' does not change */ @@ -1932,18 +1932,18 @@ } if ( tuple_coords[i] == 0 ) - { + { FT_TRACE6(( " tuple coordinate is zero, ignore\n" )); continue; } if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) ) - { + { /* not an intermediate tuple */ - + if ( ( tuple_coords[i] > ncv && ncv > 0 ) || ( tuple_coords[i] < ncv && ncv < 0 ) ) - { + { FT_TRACE6(( " tuple coordinate %.5f fits\n", (double)tuple_coords[i] / 65536 )); apply = FT_MulDiv( apply, ncv, tuple_coords[i] ); From 7ff43d3e9f981991048a459303e431bf0c617a36 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 26 May 2024 19:40:20 -0400 Subject: [PATCH 161/191] [truetype/GX] Consolidate memory allocations. * src/truetype/ttgxvar.c (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Allocate and split bigger memory blocks, avoid unnecessary zeroing, do not copy shared tuples, revise error exit paths. --- src/truetype/ttgxvar.c | 149 +++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 89 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index a73dc719a..6ee667144 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -3521,9 +3521,10 @@ FT_ULong here; FT_UInt i, j; - FT_Fixed* tuple_coords = NULL; - FT_Fixed* im_start_coords = NULL; - FT_Fixed* im_end_coords = NULL; + FT_Fixed* peak_coords = NULL; + FT_Fixed* tuple_coords; + FT_Fixed* im_start_coords; + FT_Fixed* im_end_coords; GX_Blend blend = face->blend; @@ -3544,16 +3545,16 @@ { FT_TRACE2(( "\n" )); FT_TRACE2(( "tt_face_vary_cvt: no blend specified\n" )); - error = FT_Err_Ok; - goto Exit; + + return FT_Err_Ok; } if ( !face->cvt ) { FT_TRACE2(( "\n" )); FT_TRACE2(( "tt_face_vary_cvt: no `cvt ' table\n" )); - error = FT_Err_Ok; - goto Exit; + + return FT_Err_Ok; } error = face->goto_table( face, TTAG_cvar, stream, &table_len ); @@ -3561,15 +3562,11 @@ { FT_TRACE2(( "is missing\n" )); - error = FT_Err_Ok; - goto Exit; + return FT_Err_Ok; } if ( FT_FRAME_ENTER( table_len ) ) - { - error = FT_Err_Ok; - goto Exit; - } + return FT_Err_Ok; table_start = FT_Stream_FTell( stream ); if ( FT_GET_LONG() != 0x00010000L ) @@ -3582,11 +3579,6 @@ FT_TRACE2(( "loaded\n" )); - if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_start_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_end_coords, blend->num_axis ) ) - goto FExit; - tupleCount = FT_GET_USHORT(); offsetToData = FT_GET_USHORT(); @@ -3622,8 +3614,12 @@ tupleCount & GX_TC_TUPLE_COUNT_MASK, ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "" : "s" )); - if ( FT_NEW_ARRAY( cvt_deltas, face->cvt_size ) ) - goto FExit; + if ( FT_QNEW_ARRAY( peak_coords, 3 * blend->num_axis ) || + FT_NEW_ARRAY( cvt_deltas, face->cvt_size ) ) + goto Exit; + + im_start_coords = peak_coords + blend->num_axis; + im_end_coords = im_start_coords + blend->num_axis; for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ ) { @@ -3640,32 +3636,19 @@ if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD ) { for ( j = 0; j < blend->num_axis; j++ ) - tuple_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + peak_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + tuple_coords = peak_coords; } - else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount ) + else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) < blend->tuplecount ) + tuple_coords = blend->tuplecoords + + ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis; + else { FT_TRACE2(( "tt_face_vary_cvt:" " invalid tuple index\n" )); error = FT_THROW( Invalid_Table ); - goto FExit; - } - else - { - if ( !blend->tuplecoords ) - { - FT_TRACE2(( "tt_face_vary_cvt:" - " no valid tuple coordinates available\n" )); - - error = FT_THROW( Invalid_Table ); - goto FExit; - } - - FT_MEM_COPY( - tuple_coords, - blend->tuplecoords + - ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis, - blend->num_axis * sizeof ( FT_Fixed ) ); + goto Exit; } if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) @@ -3808,22 +3791,20 @@ for ( i = 0; i < face->cvt_size; i++ ) face->cvt[i] += FT_fixedToFdot6( cvt_deltas[i] ); - FExit: - FT_FRAME_EXIT(); + /* iterate over all FT_Size objects and set `cvt_ready' to -1 */ + /* to trigger rescaling of all CVT values */ + FT_List_Iterate( &root->sizes_list, + tt_cvt_ready_iterator, + NULL ); Exit: if ( sharedpoints != ALL_POINTS ) FT_FREE( sharedpoints ); - FT_FREE( tuple_coords ); - FT_FREE( im_start_coords ); - FT_FREE( im_end_coords ); FT_FREE( cvt_deltas ); + FT_FREE( peak_coords ); - /* iterate over all FT_Size objects and set `cvt_ready' to -1 */ - /* to trigger rescaling of all CVT values */ - FT_List_Iterate( &root->sizes_list, - tt_cvt_ready_iterator, - NULL ); + FExit: + FT_FRAME_EXIT(); return error; @@ -4087,9 +4068,10 @@ FT_ULong here; FT_UInt i, j; - FT_Fixed* tuple_coords = NULL; - FT_Fixed* im_start_coords = NULL; - FT_Fixed* im_end_coords = NULL; + FT_Fixed* peak_coords = NULL; + FT_Fixed* tuple_coords; + FT_Fixed* im_start_coords; + FT_Fixed* im_end_coords; GX_Blend blend = face->blend; @@ -4124,27 +4106,17 @@ return FT_Err_Ok; } - if ( FT_NEW_ARRAY( points_org, n_points ) || - FT_NEW_ARRAY( points_out, n_points ) || - FT_NEW_ARRAY( has_delta, n_points ) ) - goto Fail1; - dataSize = blend->glyphoffsets[glyph_index + 1] - blend->glyphoffsets[glyph_index]; if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] ) || FT_FRAME_ENTER( dataSize ) ) - goto Fail1; + return error; glyph_start = FT_Stream_FTell( stream ); /* each set of glyph variation data is formatted similarly to `cvar' */ - if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_start_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_end_coords, blend->num_axis ) ) - goto Fail2; - tupleCount = FT_GET_USHORT(); offsetToData = FT_GET_USHORT(); @@ -4156,7 +4128,7 @@ " invalid glyph variation array header\n" )); error = FT_THROW( Invalid_Table ); - goto Fail2; + goto FExit; } offsetToData += glyph_start; @@ -4180,9 +4152,16 @@ tupleCount & GX_TC_TUPLE_COUNT_MASK, ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "" : "s" )); - if ( FT_NEW_ARRAY( point_deltas_x, n_points ) || - FT_NEW_ARRAY( point_deltas_y, n_points ) ) - goto Fail3; + if ( FT_QNEW_ARRAY( peak_coords, 3 * blend->num_axis ) || + FT_NEW_ARRAY( point_deltas_x, 2 * n_points ) || + FT_QNEW_ARRAY( points_org, n_points ) || + FT_QNEW_ARRAY( points_out, n_points ) || + FT_QNEW_ARRAY( has_delta, n_points ) ) + goto Exit; + + im_start_coords = peak_coords + blend->num_axis; + im_end_coords = im_start_coords + blend->num_axis; + point_deltas_y = point_deltas_x + n_points; for ( j = 0; j < n_points; j++ ) { @@ -4205,22 +4184,20 @@ if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD ) { for ( j = 0; j < blend->num_axis; j++ ) - tuple_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + peak_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + tuple_coords = peak_coords; } - else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount ) + else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) < blend->tuplecount ) + tuple_coords = blend->tuplecoords + + ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis; + else { FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" " invalid tuple index\n" )); error = FT_THROW( Invalid_Table ); - goto Fail3; + goto Exit; } - else - FT_MEM_COPY( - tuple_coords, - blend->tuplecoords + - ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis, - blend->num_axis * sizeof ( FT_Fixed ) ); if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) { @@ -4448,23 +4425,17 @@ unrounded[n_points - 2].y ) / 64; } - Fail3: - FT_FREE( point_deltas_x ); - FT_FREE( point_deltas_y ); - - Fail2: + Exit: if ( sharedpoints != ALL_POINTS ) FT_FREE( sharedpoints ); - FT_FREE( tuple_coords ); - FT_FREE( im_start_coords ); - FT_FREE( im_end_coords ); - - FT_FRAME_EXIT(); - - Fail1: FT_FREE( points_org ); FT_FREE( points_out ); FT_FREE( has_delta ); + FT_FREE( peak_coords ); + FT_FREE( point_deltas_x ); + + FExit: + FT_FRAME_EXIT(); return error; } From d41a855aab6d8ce131c465ce01f0f536e0fb2269 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 29 May 2024 17:01:29 -0400 Subject: [PATCH 162/191] [ttgxvar] Replace tabs with spaces Also clarify comments around conversion and clamping. * src/truetype/ttgxvar.c (ft_var_to_normalized): doit --- src/truetype/ttgxvar.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 6ee667144..7d67d5f8d 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -2129,12 +2129,12 @@ outerIndex, innerIndex ); - /* Convert to 16.16 format before adding. */ - v += MUL_INT( delta, 4 ); + /* Convert delta in F2DOT14 to 16.16 before adding. */ + v += MUL_INT( delta, 4 ); - /* Clamp value range. */ - v = v >= 0x10000L ? 0x10000 : v; - v = v <= -0x10000L ? -0x10000 : v; + /* Clamp value range [-1, 1]. */ + v = v >= 0x10000L ? 0x10000 : v; + v = v <= -0x10000L ? -0x10000 : v; new_normalized[i] = v; } From deba7feb579ff8122f15fa2eedc89348ae79922d Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 18 Jun 2024 14:01:58 +0000 Subject: [PATCH 163/191] * include/freetype/ftimage.h: Explain standard types. --- include/freetype/ftimage.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 9d7f6b77d..7d4a99f38 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -21,6 +21,10 @@ * Note: A 'raster' is simply a scan-line converter, used to render * `FT_Outline`s into `FT_Bitmap`s. * + * Note: This file can be used for STANDALONE_ compilation of raster (B/W) + * and smooth (anti-aliased) renderers. Therefore, it must rely on + * standard variable types only rather than aliases in fttypes.h. + * */ From 93a067e31240058103ce04057dd76dcf98c18d15 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 18 Jun 2024 17:48:41 +0000 Subject: [PATCH 164/191] [base, autofit, psaux] Remove unnecessary casting. * src/autofit/afhints.c (af_glyph_hints_reload): Remove (short) casting. * src/base/ftgloadr.c (FT_GlyphLoader_Add): Ditto. * src/psaux/psobjs.c ({t1,cff,ps}_builder_{add,close}_contour): Ditto. --- src/autofit/afhints.c | 4 ++-- src/base/ftgloadr.c | 22 ++++++---------------- src/psaux/psobjs.c | 18 ++++++------------ 3 files changed, 14 insertions(+), 30 deletions(-) diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index 27d7bc1a9..099a5f82a 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -1049,13 +1049,13 @@ AF_Point* contour = hints->contours; AF_Point* contour_limit = contour + hints->num_contours; short* end = outline->contours; - short idx = 0; + FT_Int idx = 0; for ( ; contour < contour_limit; contour++, end++ ) { contour[0] = points + idx; - idx = (short)( end[0] + 1 ); + idx = *end + 1; } } diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c index e0c107f47..4d94c3d5d 100644 --- a/src/base/ftgloadr.c +++ b/src/base/ftgloadr.c @@ -357,9 +357,6 @@ { FT_GlyphLoad base; FT_GlyphLoad current; - - FT_Int n_curr_contours; - FT_Int n_base_points; FT_Int n; @@ -369,20 +366,13 @@ base = &loader->base; current = &loader->current; - n_curr_contours = current->outline.n_contours; - n_base_points = base->outline.n_points; - - base->outline.n_points = - (short)( base->outline.n_points + current->outline.n_points ); - base->outline.n_contours = - (short)( base->outline.n_contours + current->outline.n_contours ); - - base->num_subglyphs += current->num_subglyphs; - /* adjust contours count in newest outline */ - for ( n = 0; n < n_curr_contours; n++ ) - current->outline.contours[n] = - (short)( current->outline.contours[n] + n_base_points ); + for ( n = 0; n < current->outline.n_contours; n++ ) + current->outline.contours[n] += base->outline.n_points; + + base->outline.n_points += current->outline.n_points; + base->outline.n_contours += current->outline.n_contours; + base->num_subglyphs += current->num_subglyphs; /* prepare for another new glyph image */ FT_GlyphLoader_Prepare( loader ); diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index b251b3596..d3a61fd64 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -1677,8 +1677,7 @@ if ( !error ) { if ( outline->n_contours > 0 ) - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; outline->n_contours++; } @@ -1760,8 +1759,7 @@ outline->n_points--; } else - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; } } @@ -1959,8 +1957,7 @@ if ( !error ) { if ( outline->n_contours > 0 ) - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; outline->n_contours++; } @@ -2039,8 +2036,7 @@ outline->n_points--; } else - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; } } @@ -2267,8 +2263,7 @@ if ( !error ) { if ( outline->n_contours > 0 ) - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; outline->n_contours++; } @@ -2347,8 +2342,7 @@ outline->n_points--; } else - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; } } From 7a753c9653d91dbf57d96935811e164a963b0669 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 18 Jun 2024 21:14:58 -0400 Subject: [PATCH 165/191] * src/base/ftgloadr.c (FT_GlyphLoader_Prepare): Minor refactoring. --- src/base/ftgloadr.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c index 4d94c3d5d..484d98f17 100644 --- a/src/base/ftgloadr.c +++ b/src/base/ftgloadr.c @@ -355,24 +355,25 @@ FT_BASE_DEF( void ) FT_GlyphLoader_Add( FT_GlyphLoader loader ) { - FT_GlyphLoad base; - FT_GlyphLoad current; - FT_Int n; + FT_Outline* base; + FT_Outline* current; + FT_Int n; if ( !loader ) return; - base = &loader->base; - current = &loader->current; + base = &loader->base.outline; + current = &loader->current.outline; /* adjust contours count in newest outline */ - for ( n = 0; n < current->outline.n_contours; n++ ) - current->outline.contours[n] += base->outline.n_points; + for ( n = 0; n < current->n_contours; n++ ) + current->contours[n] += base->n_points; - base->outline.n_points += current->outline.n_points; - base->outline.n_contours += current->outline.n_contours; - base->num_subglyphs += current->num_subglyphs; + base->n_points += current->n_points; + base->n_contours += current->n_contours; + + loader->base.num_subglyphs += loader->current.num_subglyphs; /* prepare for another new glyph image */ FT_GlyphLoader_Prepare( loader ); From 2b9fdec5fafd16fba93a9947563260ab9feb9029 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Wed, 19 Jun 2024 21:38:58 -0400 Subject: [PATCH 166/191] * src/pfr/pfrgload.c (pfr_glyph_curve_to): Avoid casting. --- src/pfr/pfrgload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index 6216cf169..8ad65ec9d 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -189,7 +189,7 @@ tag[1] = FT_CURVE_TAG_CUBIC; tag[2] = FT_CURVE_TAG_ON; - outline->n_points = (FT_Short)( outline->n_points + 3 ); + outline->n_points += 3; } Exit: From 2a7bb4596f566a34fd53932af0ef53b956459d25 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 20 Jun 2024 20:49:56 -0400 Subject: [PATCH 167/191] Use unsigned point and contour indexing in `FT_Outline`. This doubles the number or allowed points, see https://github.com/harfbuzz/harfbuzz/issues/4752 Although it is hardly practical to use more than 32767 points, other font engines seem to support it. * docs/CHANGES: Announce it. * include/freetype/ftimage.h (FT_Outline): Do it and update limits. * src/*: Update `FT_Outline` users. --- docs/CHANGES | 12 ++++++++++-- include/freetype/ftimage.h | 16 ++++++++-------- include/freetype/internal/tttypes.h | 4 ++-- src/autofit/afhints.c | 10 +++++----- src/base/ftbbox.c | 2 +- src/base/ftoutln.c | 8 +++++--- src/base/ftstroke.c | 10 +++++----- src/pfr/pfrgload.c | 2 +- src/pshinter/pshalgo.c | 6 +++--- src/raster/ftraster.c | 2 +- src/sdf/ftsdf.c | 2 +- src/smooth/ftgrays.c | 2 +- src/truetype/ttgload.c | 29 ++++++++++++++--------------- src/truetype/ttinterp.c | 14 ++++++-------- src/truetype/ttobjs.c | 2 +- src/truetype/ttobjs.h | 2 +- 16 files changed, 65 insertions(+), 58 deletions(-) diff --git a/docs/CHANGES b/docs/CHANGES index fc18eb10a..4c98128f8 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,13 +1,21 @@ CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Mmm-DD) - I. IMPORTANT BUG FIXES + I. IMPORTANT CHANGES + + - Some fields in the `FT_Outline` structure have been changed + from signed to unsigned type, which better reflects the actual + usage. It is also an additional means to protect against + malformed input. + + + II. IMPORTANT BUG FIXES - Rare double-free crashes in the cache subsystem have been fixed. - Excessive stack allocation in the autohinter has been fixed. - II. MISCELLANEOUS + III. MISCELLANEOUS - The B/W rasterizer has received a major upkeep that resulted in large performance improvement. The rendering speed has increased diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 7d4a99f38..6795a8ed0 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -345,14 +345,14 @@ FT_BEGIN_HEADER */ typedef struct FT_Outline_ { - short n_contours; /* number of contours in glyph */ - short n_points; /* number of points in the glyph */ + unsigned short n_contours; /* number of contours in glyph */ + unsigned short n_points; /* number of points in the glyph */ - FT_Vector* points; /* the outline's points */ - char* tags; /* the points flags */ - short* contours; /* the contour end points */ + FT_Vector* points; /* the outline's points */ + char* tags; /* the points flags */ + unsigned short* contours; /* the contour end points */ - int flags; /* outline masks */ + int flags; /* outline masks */ } FT_Outline; @@ -360,8 +360,8 @@ FT_BEGIN_HEADER /* Following limits must be consistent with */ /* FT_Outline.{n_contours,n_points} */ -#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX -#define FT_OUTLINE_POINTS_MAX SHRT_MAX +#define FT_OUTLINE_CONTOURS_MAX USHRT_MAX +#define FT_OUTLINE_POINTS_MAX USHRT_MAX /************************************************************************** diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index 44a0165cc..7053e656a 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/freetype/internal/tttypes.h @@ -1655,9 +1655,9 @@ FT_BEGIN_HEADER { FT_Memory memory; FT_UShort max_points; - FT_Short max_contours; + FT_UShort max_contours; FT_UShort n_points; /* number of points in zone */ - FT_Short n_contours; /* number of contours */ + FT_UShort n_contours; /* number of contours */ FT_Vector* org; /* original point coordinates */ FT_Vector* cur; /* current point coordinates */ diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index 099a5f82a..6b48bc598 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -980,7 +980,7 @@ { FT_Vector* vec = outline->points; char* tag = outline->tags; - FT_Short endpoint = outline->contours[0]; + FT_UShort endpoint = outline->contours[0]; AF_Point end = points + endpoint; AF_Point prev = end; FT_Int contour_index = 0; @@ -1046,10 +1046,10 @@ /* set up the contours array */ { - AF_Point* contour = hints->contours; - AF_Point* contour_limit = contour + hints->num_contours; - short* end = outline->contours; - FT_Int idx = 0; + AF_Point* contour = hints->contours; + AF_Point* contour_limit = contour + hints->num_contours; + FT_UShort* end = outline->contours; + FT_Int idx = 0; for ( ; contour < contour_limit; contour++, end++ ) diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index e98c29fc7..d6aa5d56d 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -489,7 +489,7 @@ return FT_THROW( Invalid_Outline ); /* if outline is empty, return (0,0,0,0) */ - if ( outline->n_points == 0 || outline->n_contours <= 0 ) + if ( outline->n_points == 0 || outline->n_contours == 0 ) { abbox->xMin = abbox->xMax = 0; abbox->yMin = abbox->yMax = 0; diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index c7564dbd3..dc242e3f8 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -332,8 +332,8 @@ FT_NEW_ARRAY( anoutline->contours, numContours ) ) goto Fail; - anoutline->n_points = (FT_Short)numPoints; - anoutline->n_contours = (FT_Short)numContours; + anoutline->n_points = (FT_UShort)numPoints; + anoutline->n_contours = (FT_UShort)numContours; anoutline->flags |= FT_OUTLINE_OWNER; return FT_Err_Ok; @@ -359,12 +359,14 @@ FT_Int n; + FT_TRACE5(( "FT_Outline_Check: contours = %d, points = %d\n", + n_contours, n_points )); /* empty glyph? */ if ( n_points == 0 && n_contours == 0 ) return FT_Err_Ok; /* check point and contour counts */ - if ( n_points <= 0 || n_contours <= 0 ) + if ( n_points == 0 || n_contours == 0 ) goto Bad; end0 = -1; diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c index 443b48aaf..21fa0d425 100644 --- a/src/base/ftstroke.c +++ b/src/base/ftstroke.c @@ -727,10 +727,10 @@ /* copy contours */ { - FT_UInt count = border->num_points; - FT_Byte* tags = border->tags; - FT_Short* write = outline->contours + outline->n_contours; - FT_Short idx = (FT_Short)outline->n_points; + FT_UInt count = border->num_points; + FT_Byte* tags = border->tags; + FT_UShort* write = outline->contours + outline->n_contours; + FT_UShort idx = outline->n_points; for ( ; count > 0; count--, tags++, idx++ ) @@ -743,7 +743,7 @@ } } - outline->n_points += (short)border->num_points; + outline->n_points += (FT_UShort)border->num_points; FT_ASSERT( FT_Outline_Check( outline ) == 0 ); } diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index 8ad65ec9d..ec0a87893 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -108,7 +108,7 @@ /* don't add empty contours */ if ( last >= first ) - outline->contours[outline->n_contours++] = (short)last; + outline->contours[outline->n_contours++] = (FT_UShort)last; glyph->path_begun = 0; } diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 2d7b9c227..18695936c 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -1171,8 +1171,8 @@ FT_QNEW_ARRAY( glyph->contours, outline->n_contours ) ) goto Exit; - glyph->num_points = (FT_UInt)outline->n_points; - glyph->num_contours = (FT_UInt)outline->n_contours; + glyph->num_points = outline->n_points; + glyph->num_contours = outline->n_contours; { FT_UInt first = 0, next, n; @@ -1186,7 +1186,7 @@ PSH_Point point; - next = (FT_UInt)outline->contours[n] + 1; + next = outline->contours[n] + 1; count = next - first; contour->start = points + first; diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 51ad66b60..02c2d63ec 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -2683,7 +2683,7 @@ return FT_THROW( Invalid_Outline ); /* return immediately if the outline is empty */ - if ( outline->n_points == 0 || outline->n_contours <= 0 ) + if ( outline->n_points == 0 || outline->n_contours == 0 ) return Raster_Err_Ok; if ( !outline->contours || !outline->points ) diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c index 4394001e2..dc55d4263 100644 --- a/src/sdf/ftsdf.c +++ b/src/sdf/ftsdf.c @@ -3837,7 +3837,7 @@ } /* if the outline is empty, return */ - if ( outline->n_points <= 0 || outline->n_contours <= 0 ) + if ( outline->n_points == 0 || outline->n_contours == 0 ) goto Exit; /* check whether the outline has valid fields */ diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index f011e9f8d..b7c0632a6 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1981,7 +1981,7 @@ typedef ptrdiff_t FT_PtrDist; return FT_THROW( Invalid_Outline ); /* return immediately if the outline is empty */ - if ( outline->n_points == 0 || outline->n_contours <= 0 ) + if ( outline->n_points == 0 || outline->n_contours == 0 ) return Smooth_Err_Ok; if ( !outline->contours || !outline->points ) diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index b7d8e1d66..e6806b0cb 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -353,7 +353,8 @@ FT_Byte c, count; FT_Vector *vec, *vec_limit; FT_Pos x, y; - FT_Short *cont, *cont_limit, last; + FT_UShort *cont, *cont_limit; + FT_Int last; /* check that we can add the contours to the glyph */ @@ -372,7 +373,7 @@ last = -1; for ( ; cont < cont_limit; cont++ ) { - *cont = FT_NEXT_SHORT( p ); + *cont = FT_NEXT_USHORT( p ); if ( *cont <= last ) goto Invalid_Outline; @@ -530,8 +531,8 @@ *flag = (FT_Byte)( f & ON_CURVE_POINT ); } - outline->n_points = (FT_Short)n_points; - outline->n_contours = (FT_Short)n_contours; + outline->n_points = (FT_UShort)n_points; + outline->n_contours = (FT_UShort)n_contours; load->cursor = p; @@ -752,10 +753,8 @@ FT_UInt start_point, FT_UInt start_contour ) { - zone->n_points = (FT_UShort)load->outline.n_points + 4 - - (FT_UShort)start_point; - zone->n_contours = load->outline.n_contours - - (FT_Short)start_contour; + zone->n_points = load->outline.n_points + 4 - (FT_UShort)start_point; + zone->n_contours = load->outline.n_contours - (FT_UShort)start_contour; zone->org = load->extra_points + start_point; zone->cur = load->outline.points + start_point; zone->orus = load->extra_points2 + start_point; @@ -1044,7 +1043,7 @@ current.points = gloader->base.outline.points + num_base_points; current.n_points = gloader->base.outline.n_points - - (short)num_base_points; + (FT_UShort)num_base_points; have_scale = FT_BOOL( subglyph->flags & ( WE_HAVE_A_SCALE | WE_HAVE_AN_XY_SCALE | @@ -1057,7 +1056,7 @@ /* get offset */ if ( !( subglyph->flags & ARGS_ARE_XY_VALUES ) ) { - FT_UInt num_points = (FT_UInt)gloader->base.outline.n_points; + FT_UInt num_points = gloader->base.outline.n_points; FT_UInt k = (FT_UInt)subglyph->arg1; FT_UInt l = (FT_UInt)subglyph->arg2; FT_Vector* p1; @@ -1719,8 +1718,8 @@ FT_List_Add( &loader->composites, node ); } - start_point = (FT_UInt)gloader->base.outline.n_points; - start_contour = (FT_UInt)gloader->base.outline.n_contours; + start_point = gloader->base.outline.n_points; + start_contour = gloader->base.outline.n_contours; /* for each subglyph, read composite header */ error = face->read_composite_glyph( loader ); @@ -1872,7 +1871,7 @@ linear_hadvance = loader->linear; linear_vadvance = loader->vadvance; - num_base_points = (FT_UInt)gloader->base.outline.n_points; + num_base_points = gloader->base.outline.n_points; error = load_truetype_glyph( loader, (FT_UInt)subglyph->index, @@ -1896,7 +1895,7 @@ loader->vadvance = linear_vadvance; } - num_points = (FT_UInt)gloader->base.outline.n_points; + num_points = gloader->base.outline.n_points; if ( num_points == num_base_points ) continue; @@ -2717,7 +2716,7 @@ size->metrics->y_ppem < 24 ) glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; - FT_TRACE1(( " subglyphs = %u, contours = %hd, points = %hd," + FT_TRACE1(( " subglyphs = %u, contours = %hu, points = %hu," " flags = 0x%.3x\n", loader.gloader->base.num_subglyphs, glyph->outline.n_contours, diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index 0889c6151..951891dbf 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -5270,11 +5270,11 @@ FT_UShort refp; FT_F26Dot6 dx, dy; - FT_Short contour, bounds; + FT_UShort contour, bounds; FT_UShort start, limit, i; - contour = (FT_Short)args[0]; + contour = (FT_UShort)args[0]; bounds = ( exc->GS.gep2 == 0 ) ? 1 : exc->zp2.n_contours; if ( BOUNDS( contour, bounds ) ) @@ -5290,15 +5290,13 @@ if ( contour == 0 ) start = 0; else - start = (FT_UShort)( exc->zp2.contours[contour - 1] + 1 - - exc->zp2.first_point ); + start = exc->zp2.contours[contour - 1] + 1 - exc->zp2.first_point; /* we use the number of points if in the twilight zone */ if ( exc->GS.gep2 == 0 ) limit = exc->zp2.n_points; else - limit = (FT_UShort)( exc->zp2.contours[contour] - - exc->zp2.first_point + 1 ); + limit = exc->zp2.contours[contour] + 1 - exc->zp2.first_point; for ( i = start; i < limit; i++ ) { @@ -5341,9 +5339,9 @@ /* Normal zone's `n_points' includes phantoms, so must */ /* use end of last contour. */ if ( exc->GS.gep2 == 0 ) - limit = (FT_UShort)exc->zp2.n_points; + limit = exc->zp2.n_points; else if ( exc->GS.gep2 == 1 && exc->zp2.n_contours > 0 ) - limit = (FT_UShort)( exc->zp2.contours[exc->zp2.n_contours - 1] + 1 ); + limit = exc->zp2.contours[exc->zp2.n_contours - 1] + 1; else limit = 0; diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 05489d732..08aee62a8 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -115,7 +115,7 @@ FT_LOCAL_DEF( FT_Error ) tt_glyphzone_new( FT_Memory memory, FT_UShort maxPoints, - FT_Short maxContours, + FT_UShort maxContours, TT_GlyphZone zone ) { FT_Error error; diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h index 0a63e6729..9c36ca783 100644 --- a/src/truetype/ttobjs.h +++ b/src/truetype/ttobjs.h @@ -105,7 +105,7 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Error ) tt_glyphzone_new( FT_Memory memory, FT_UShort maxPoints, - FT_Short maxContours, + FT_UShort maxContours, TT_GlyphZone zone ); #endif /* TT_USE_BYTECODE_INTERPRETER */ From b1cbcb20454e3b465b0d3ea4d5457975cfa747e7 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Thu, 20 Jun 2024 15:00:20 -0400 Subject: [PATCH 168/191] [ttgxvar] Avoid "applying zero offset to null pointer" In C it is undefined behavior to do arithmetic on a null pointer, including adding zero. When using NotoSansKhmer[wdth,wght].ttf UBSAN produces a report like ttgxvar.c:1052:31: runtime error: applying zero offset to null pointer when adding zero to `varData->deltaSet` (which is null) to produce `bytes`. Protect against all the potential issues of this kind by returning early if `varData->regionIdxCount == 0`. * src/truetype/ttgxvar.c (tt_var_get_item_delta): early return on no regions --- src/truetype/ttgxvar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 7d67d5f8d..095a72055 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -1028,6 +1028,9 @@ if ( innerIndex >= varData->itemCount ) return 0; /* Out of range. */ + if ( varData->regionIdxCount == 0 ) + return 0; /* Avoid "applying zero offset to null pointer". */ + if ( varData->regionIdxCount < 16 ) { deltaSet = deltaSetStack; From 044d142be7b6a93b6940367a1bc5847451ff4775 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 20 Jun 2024 22:16:51 -0400 Subject: [PATCH 169/191] Use unsigned tags `FT_Outline`. This change comes along with 2a7bb4596f56 ans is only meant to reduce pointer casting in the code. * include/freetype/ftimage.h (FT_Outline): Do it. * src/*: Update `FT_Outline` users. --- include/freetype/ftimage.h | 2 +- src/autofit/afhints.c | 4 ++-- src/base/ftoutln.c | 8 ++++---- src/base/ftstroke.c | 4 ++-- src/pfr/pfrgload.c | 4 ++-- src/psaux/psobjs.c | 12 ++++++------ src/pshinter/pshalgo.c | 2 +- src/raster/ftraster.c | 2 +- src/truetype/ttgload.c | 10 +++++----- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 6795a8ed0..6c7085f61 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -349,7 +349,7 @@ FT_BEGIN_HEADER unsigned short n_points; /* number of points in the glyph */ FT_Vector* points; /* the outline's points */ - char* tags; /* the points flags */ + unsigned char* tags; /* the points flags */ unsigned short* contours; /* the contour end points */ int flags; /* outline masks */ diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index 6b48bc598..96ffe343a 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -979,7 +979,7 @@ /* compute coordinates & Bezier flags, next and prev */ { FT_Vector* vec = outline->points; - char* tag = outline->tags; + FT_Byte* tag = outline->tags; FT_UShort endpoint = outline->contours[0]; AF_Point end = points + endpoint; AF_Point prev = end; @@ -1292,7 +1292,7 @@ AF_Point point = hints->points; AF_Point limit = point + hints->num_points; FT_Vector* vec = outline->points; - char* tag = outline->tags; + FT_Byte* tag = outline->tags; for ( ; point < limit; point++, vec++, tag++ ) diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index dc242e3f8..ef699b3c7 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -53,7 +53,7 @@ FT_Vector* point; FT_Vector* limit; - char* tags; + FT_Byte* tags; FT_Error error; @@ -578,13 +578,13 @@ /* reverse tags table */ { - char* p = outline->tags + first; - char* q = outline->tags + last; + FT_Byte* p = outline->tags + first; + FT_Byte* q = outline->tags + last; while ( p < q ) { - char swap; + FT_Byte swap; swap = *p; diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c index 21fa0d425..64f46ce43 100644 --- a/src/base/ftstroke.c +++ b/src/base/ftstroke.c @@ -711,7 +711,7 @@ { FT_UInt count = border->num_points; FT_Byte* read = border->tags; - FT_Byte* write = (FT_Byte*)outline->tags + outline->n_points; + FT_Byte* write = outline->tags + outline->n_points; for ( ; count > 0; count--, read++, write++ ) @@ -2050,7 +2050,7 @@ FT_Vector* point; FT_Vector* limit; - char* tags; + FT_Byte* tags; FT_Error error; diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index ec0a87893..e85007552 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -178,8 +178,8 @@ error = FT_GLYPHLOADER_CHECK_POINTS( loader, 3, 0 ); if ( !error ) { - FT_Vector* vec = outline->points + outline->n_points; - FT_Byte* tag = (FT_Byte*)outline->tags + outline->n_points; + FT_Vector* vec = outline->points + outline->n_points; + FT_Byte* tag = outline->tags + outline->n_points; vec[0] = *control1; diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index d3a61fd64..b361d7077 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -1624,7 +1624,7 @@ if ( builder->load_points ) { FT_Vector* point = outline->points + outline->n_points; - FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; + FT_Byte* control = outline->tags + outline->n_points; point->x = FIXED_TO_INT( x ); @@ -1739,7 +1739,7 @@ { FT_Vector* p1 = outline->points + first; FT_Vector* p2 = outline->points + outline->n_points - 1; - FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1; + FT_Byte* control = outline->tags + outline->n_points - 1; /* `delete' last point only if it coincides with the first */ @@ -1897,7 +1897,7 @@ if ( builder->load_points ) { FT_Vector* point = outline->points + outline->n_points; - FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; + FT_Byte* control = outline->tags + outline->n_points; #ifdef CFF_CONFIG_OPTION_OLD_ENGINE PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face ); @@ -2016,7 +2016,7 @@ { FT_Vector* p1 = outline->points + first; FT_Vector* p2 = outline->points + outline->n_points - 1; - FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1; + FT_Byte* control = outline->tags + outline->n_points - 1; /* `delete' last point only if it coincides with the first */ @@ -2184,7 +2184,7 @@ if ( builder->load_points ) { FT_Vector* point = outline->points + outline->n_points; - FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; + FT_Byte* control = outline->tags + outline->n_points; #ifdef CFF_CONFIG_OPTION_OLD_ENGINE PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face ); @@ -2322,7 +2322,7 @@ { FT_Vector* p1 = outline->points + first; FT_Vector* p2 = outline->points + outline->n_points - 1; - FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1; + FT_Byte* control = outline->tags + outline->n_points - 1; /* `delete' last point only if it coincides with the first */ diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 18695936c..967767b34 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -1118,7 +1118,7 @@ FT_UInt n; PSH_Point point = glyph->points; FT_Vector* vec = glyph->outline->points; - char* tags = glyph->outline->tags; + FT_Byte* tags = glyph->outline->tags; for ( n = 0; n < glyph->num_points; n++ ) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 02c2d63ec..e4b7b937d 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1598,7 +1598,7 @@ FT_Vector* points; FT_Vector* point; FT_Vector* limit; - char* tags; + FT_Byte* tags; UInt tag; /* current point's state */ diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index e6806b0cb..8cddc394c 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -431,7 +431,7 @@ p += n_ins; /* reading the point tags */ - flag = (FT_Byte*)outline->tags; + flag = outline->tags; flag_limit = flag + n_points; FT_ASSERT( flag ); @@ -464,7 +464,7 @@ vec = outline->points; vec_limit = vec + n_points; - flag = (FT_Byte*)outline->tags; + flag = outline->tags; x = 0; for ( ; vec < vec_limit; vec++, flag++ ) @@ -498,7 +498,7 @@ vec = outline->points; vec_limit = vec + n_points; - flag = (FT_Byte*)outline->tags; + flag = outline->tags; y = 0; for ( ; vec < vec_limit; vec++, flag++ ) @@ -758,8 +758,8 @@ zone->org = load->extra_points + start_point; zone->cur = load->outline.points + start_point; zone->orus = load->extra_points2 + start_point; - zone->tags = (FT_Byte*)load->outline.tags + start_point; - zone->contours = (FT_UShort*)load->outline.contours + start_contour; + zone->tags = load->outline.tags + start_point; + zone->contours = load->outline.contours + start_contour; zone->first_point = (FT_UShort)start_point; } From 73720c7c9958e87b3d134a7574d1720ad2d24442 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 23 Jun 2024 10:58:00 -0400 Subject: [PATCH 170/191] * src/truetype/ttgload.c (load_truetype_glyph): Unsigned fix. --- src/truetype/ttgload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 8cddc394c..b656ccf04 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -1738,14 +1738,14 @@ if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) || FT_IS_VARIATION( FT_FACE( face ) ) ) { - short i, limit; + FT_UShort i, limit; FT_SubGlyph subglyph; FT_Outline outline = { 0, 0, NULL, NULL, NULL, 0 }; FT_Vector* unrounded = NULL; - limit = (short)gloader->current.num_subglyphs; + limit = (FT_UShort)gloader->current.num_subglyphs; /* construct an outline structure for */ /* communication with `TT_Vary_Apply_Glyph_Deltas' */ From bab9564a979d1f15f39f047b9035f92a37ed8317 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 26 Jun 2024 05:39:11 +0200 Subject: [PATCH 171/191] Make 'multi' build work again. * src/psaux/psobjs.c: Include `psft.h`. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttgpos.c`. Fixes issue #1284. --- src/psaux/psobjs.c | 1 + src/sfnt/rules.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index b361d7077..d32f6edf8 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -23,6 +23,7 @@ #include "psobjs.h" #include "psconv.h" +#include "psft.h" #include "psauxerr.h" #include "psauxmod.h" diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk index a24aa1d0d..2e03dddc7 100644 --- a/src/sfnt/rules.mk +++ b/src/sfnt/rules.mk @@ -38,6 +38,7 @@ SFNT_DRV_SRC := $(SFNT_DIR)/pngshim.c \ $(SFNT_DIR)/ttcolr.c \ $(SFNT_DIR)/ttsvg.c \ $(SFNT_DIR)/ttcpal.c \ + $(SFNT_DIR)/ttgpos.c \ $(SFNT_DIR)/ttkern.c \ $(SFNT_DIR)/ttload.c \ $(SFNT_DIR)/ttmtx.c \ From 2280346192938c946d93a34ea0b2ba7a1d2ba022 Mon Sep 17 00:00:00 2001 From: Don Olmstead Date: Fri, 28 Jun 2024 17:34:05 +0000 Subject: [PATCH 172/191] CMakeLists.txt: Respect FT_DISABLE_ZLIB value The CMake build uses `find_package` to look for dependencies. Before calling `find_package` it looks to see if the dependency was disabled. If not the associated `_FOUND` variable will be set. This value is then checked to determine if the dependency is added. However `find_package(PNG)` calls `find_package(ZLIB)` within its find module. So in the case of `FT_DISABLE_ZLIB=TRUE` and `FT_DISABLE_PNG=FALSE` the `ZLIB_FOUND` value can be set and even though `FT_DISABLE_ZLIB` is turned on. Unset the value of `ZLIB_FOUND` after the call to `find_package(PNG)` so the value is only set when `FT_DISABLE_ZLIB` is turned off. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5971f57e..2fb959c0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,6 +265,8 @@ if (NOT FT_DISABLE_PNG) else () find_package(PNG) endif () + # FreePNG calls FindZLIB so unset ZLIB_FOUND to respect FT_DISABLE_ZLIB + unset(ZLIB_FOUND) endif () if (NOT FT_DISABLE_ZLIB) From 37cefe33b284d0bad4ec52bcccc1a8c2d8704340 Mon Sep 17 00:00:00 2001 From: Philip Race Date: Thu, 13 Jun 2024 12:01:54 -0700 Subject: [PATCH 173/191] * psobjs.c (ps_table_add): Check length before calling `FT_MEM_CPY`. Fixes issue #1280. --- src/psaux/psobjs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index d32f6edf8..eca465f00 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -201,7 +201,9 @@ /* add the object to the base block and adjust offset */ table->elements[idx] = FT_OFFSET( table->block, table->cursor ); table->lengths [idx] = length; - FT_MEM_COPY( table->block + table->cursor, object, length ); + /* length == 0 also implies a NULL destination, so skip the copy call */ + if ( length > 0 ) + FT_MEM_COPY( table->block + table->cursor, object, length ); table->cursor += length; return FT_Err_Ok; From 1452355de99d22b0cba6ccc17bf5cdf3682ef61e Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 18 Jul 2024 09:31:19 +0200 Subject: [PATCH 174/191] * src/truetype/ttobjs.c (tt_size_run_prep): Correct scaling of CVT values. This reverts the scaling behaviour introduced in commit 37580053. Fixes issue #1005. --- src/truetype/ttobjs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 08aee62a8..d0ac31812 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -994,16 +994,16 @@ FT_Error error; FT_UInt i; - /* unscaled CVT values are already stored in 26.6 format */ - FT_Fixed scale = size->ttmetrics.scale >> 6; - /* Scale the cvt values to the new ppem. */ /* By default, we use the y ppem value for scaling. */ FT_TRACE6(( "CVT values:\n" )); for ( i = 0; i < size->cvt_size; i++ ) { - size->cvt[i] = FT_MulFix( face->cvt[i], scale ); + /* Unscaled CVT values are already stored in 26.6 format. */ + /* Note that this scaling operation is very sensitive to rounding; */ + /* the integer division by 64 must be applied to the first argument. */ + size->cvt[i] = FT_MulFix( face->cvt[i] / 64, size->ttmetrics.scale ); FT_TRACE6(( " %3d: %f (%f)\n", i, (double)face->cvt[i] / 64, (double)size->cvt[i] / 64 )); } From 97069edd163b66ce11e8152bee3055b2fa627e15 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 27 Jul 2024 20:41:25 +0000 Subject: [PATCH 175/191] * include/freetype/internal/ftcalc.h (FT_MSB)[_M_ARM64EC]: Added. --- include/freetype/internal/ftcalc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index 40634602f..aba9b69a8 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -415,7 +415,7 @@ FT_BEGIN_HEADER #define FT_MSB( x ) ( 31 - _CountLeadingZeros( x ) ) -#elif defined( _M_ARM64 ) || defined( _M_ARM ) +#elif defined( _M_ARM64 ) || defined( _M_ARM ) || defined( _M_ARM64EC ) #include #pragma intrinsic( _CountLeadingZeros ) From 248885405683d82a54f694feacc07113d697f862 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 28 Jul 2024 19:42:49 -0400 Subject: [PATCH 176/191] [bdf,pcf,winfonts,sfnt] Remove barely used marcros. * include/freetype/internal/ftobjs.h (FT_FACE_SIZE, FT_SIZE_FACE): Removed. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Updated. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): Ditto. --- include/freetype/internal/ftobjs.h | 6 ------ src/bdf/bdfdrivr.c | 4 ++-- src/pcf/pcfdrivr.c | 2 +- src/sfnt/ttbdf.c | 2 +- src/winfonts/winfnt.c | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index e6333c2aa..a1e93298f 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -604,12 +604,6 @@ FT_BEGIN_HEADER #define FT_FACE_MEMORY( x ) FT_FACE( x )->memory #define FT_FACE_STREAM( x ) FT_FACE( x )->stream -#define FT_SIZE_FACE( x ) FT_SIZE( x )->face -#define FT_SLOT_FACE( x ) FT_SLOT( x )->face - -#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph -#define FT_FACE_SIZE( x ) FT_FACE( x )->size - /************************************************************************** * diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c index e02a16093..4b9d6347f 100644 --- a/src/bdf/bdfdrivr.c +++ b/src/bdf/bdfdrivr.c @@ -780,8 +780,8 @@ THE SOFTWARE. FT_UInt glyph_index, FT_Int32 load_flags ) { - BDF_Face bdf = (BDF_Face)FT_SIZE_FACE( size ); - FT_Face face = FT_FACE( bdf ); + FT_Face face = size->face; + BDF_Face bdf = (BDF_Face)face; FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; bdf_glyph_t glyph; diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c index f1dba0240..93632f17c 100644 --- a/src/pcf/pcfdrivr.c +++ b/src/pcf/pcfdrivr.c @@ -453,7 +453,7 @@ THE SOFTWARE. FT_UInt glyph_index, FT_Int32 load_flags ) { - PCF_Face face = (PCF_Face)FT_SIZE_FACE( size ); + PCF_Face face = (PCF_Face)size->face; FT_Stream stream; FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c index 6138fc46d..d9765f486 100644 --- a/src/sfnt/ttbdf.c +++ b/src/sfnt/ttbdf.c @@ -142,7 +142,7 @@ { TT_Face ttface = (TT_Face)face; TT_BDF bdf = &ttface->bdf; - FT_Size size = FT_FACE_SIZE( face ); + FT_Size size = face->size; FT_Error error = FT_Err_Ok; FT_Byte* p; FT_UInt count; diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index 1a0f01949..6dbe74bf5 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -1006,7 +1006,7 @@ FT_UInt glyph_index, FT_Int32 load_flags ) { - FNT_Face face = (FNT_Face)FT_SIZE_FACE( size ); + FNT_Face face = (FNT_Face)size->face; FNT_Font font; FT_Error error = FT_Err_Ok; FT_Byte* p; From d42bffd4a0d0de34f81b9b7d602d4f8aee8a66a3 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 28 Jul 2024 20:32:41 -0400 Subject: [PATCH 177/191] * src/autofit/afmodule.c (af_autofitter_load_glyph): Shorten deref. --- src/autofit/afmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c index 8b0123b3e..726f6ca2b 100644 --- a/src/autofit/afmodule.c +++ b/src/autofit/afmodule.c @@ -438,7 +438,7 @@ AF_Module module = (AF_Module)module_; FT_Error error = FT_Err_Ok; - FT_Memory memory = module->root.library->memory; + FT_Memory memory = module->root.memory; #ifdef FT_DEBUG_AUTOFIT From 3f8edd234d752a4446afb36f1c5679da4858c699 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 28 Jul 2024 20:56:07 -0400 Subject: [PATCH 178/191] * src/sfnt/ttload.c (tt_face_load_name): Shorten dereference. --- src/sfnt/ttload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index fe4d51559..c3a5fae2c 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -1046,7 +1046,7 @@ FT_LOCAL_DEF( void ) tt_face_free_name( TT_Face face ) { - FT_Memory memory = face->root.driver->root.memory; + FT_Memory memory = face->root.memory; TT_NameTable table = &face->name_table; From 104f85448d4d1cbc4b07153d41ab1dfc8cf92aae Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 29 Jul 2024 20:26:00 -0400 Subject: [PATCH 179/191] [truetype/GX] Read stream more aggressively. With ample checks against the table size, we should be able to use macros without the limit checks and functional calls. * src/truetype/ttgxvar.c (ft_var_readpacked{points,deltas}): Use FT_NEXT_* instead of FT_GET_*. --- src/truetype/ttgxvar.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 095a72055..80a9312d9 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -152,6 +152,7 @@ FT_UInt runcnt; FT_UInt i, j; FT_UShort first; + FT_Byte* p; FT_Memory memory = stream->memory; FT_Error error; @@ -183,21 +184,22 @@ *point_cnt = n; + p = stream->cursor; first = 0; i = 0; while ( i < n ) { - runcnt = FT_GET_BYTE(); + runcnt = FT_NEXT_BYTE( p ); if ( runcnt & GX_PT_POINTS_ARE_WORDS ) { runcnt &= GX_PT_POINT_RUN_COUNT_MASK; - first += FT_GET_USHORT(); + first += FT_NEXT_USHORT( p ); points[i++] = first; /* first point not included in run count */ for ( j = 0; j < runcnt; j++ ) { - first += FT_GET_USHORT(); + first += FT_NEXT_USHORT( p ); points[i++] = first; if ( i >= n ) break; @@ -205,12 +207,12 @@ } else { - first += FT_GET_BYTE(); + first += FT_NEXT_BYTE( p ); points[i++] = first; for ( j = 0; j < runcnt; j++ ) { - first += FT_GET_BYTE(); + first += FT_NEXT_BYTE( p ); points[i++] = first; if ( i >= n ) break; @@ -218,6 +220,8 @@ } } + stream->cursor = p; + return points; } @@ -265,6 +269,7 @@ FT_UInt runcnt, cnt; FT_UInt i, j; FT_UInt bytes_used; + FT_Byte* p; FT_Memory memory = stream->memory; FT_Error error; @@ -272,12 +277,13 @@ if ( FT_QNEW_ARRAY( deltas, delta_cnt ) ) return NULL; + p = stream->cursor; i = 0; bytes_used = 0; while ( i < delta_cnt && bytes_used < size ) { - runcnt = FT_GET_BYTE(); + runcnt = FT_NEXT_BYTE( p ); cnt = runcnt & GX_DT_DELTA_RUN_COUNT_MASK; bytes_used++; @@ -300,7 +306,7 @@ } for ( j = 0; j <= cnt && i < delta_cnt; j++ ) - deltas[i++] = FT_intToFixed( FT_GET_SHORT() ); + deltas[i++] = FT_intToFixed( FT_NEXT_SHORT( p ) ); } else { @@ -314,7 +320,7 @@ } for ( j = 0; j <= cnt && i < delta_cnt; j++ ) - deltas[i++] = FT_intToFixed( FT_GET_CHAR() ); + deltas[i++] = FT_intToFixed( FT_NEXT_CHAR( p ) ); } if ( j <= cnt ) @@ -331,6 +337,8 @@ goto Fail; } + stream->cursor = p; + return deltas; Fail: From 5e116bb0dc7418084ec863b198392c43a8aeb44c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 30 Jul 2024 21:51:51 -0400 Subject: [PATCH 180/191] [truetype/GX] Read points and deltas more carefully. Hopefully fixes newly introduced buffer overflows: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70807 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70809 * src/truetype/ttgxvar.c (ft_var_readpacked{points,deltas}): Explicitly check stream frame limits and modify run counting. --- src/truetype/ttgxvar.c | 137 +++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 86 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 80a9312d9..b4325b1f8 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -129,9 +129,6 @@ * stream :: * The data stream. * - * size :: - * The size of the table holding the data. - * * @Output: * point_cnt :: * The number of points read. A zero value means that @@ -144,12 +141,11 @@ */ static FT_UShort* ft_var_readpackedpoints( FT_Stream stream, - FT_ULong size, FT_UInt *point_cnt ) { FT_UShort *points = NULL; FT_UInt n; - FT_UInt runcnt; + FT_UInt runcnt, cnt; FT_UInt i, j; FT_UShort first; FT_Byte* p; @@ -170,59 +166,60 @@ n |= FT_GET_BYTE(); } - if ( n > size ) - { - FT_TRACE1(( "ft_var_readpackedpoints: number of points too large\n" )); - return NULL; - } - - /* in the nested loops below we increase `i' twice; */ - /* it is faster to simply allocate one more slot */ - /* than to add another test within the loop */ - if ( FT_QNEW_ARRAY( points, n + 1 ) ) + if ( FT_QNEW_ARRAY( points, n ) ) return NULL; - *point_cnt = n; - p = stream->cursor; first = 0; i = 0; while ( i < n ) { + if ( p >= stream->limit ) + goto Fail; + runcnt = FT_NEXT_BYTE( p ); + cnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK; + + /* first point not included in run count */ + cnt++; + if ( i + cnt > n ) + cnt = n - i; + if ( runcnt & GX_PT_POINTS_ARE_WORDS ) { - runcnt &= GX_PT_POINT_RUN_COUNT_MASK; - first += FT_NEXT_USHORT( p ); - points[i++] = first; + if ( p + 2 * cnt > stream->limit ) + goto Fail; - /* first point not included in run count */ - for ( j = 0; j < runcnt; j++ ) + for ( j = 0; j < cnt; j++ ) { first += FT_NEXT_USHORT( p ); points[i++] = first; - if ( i >= n ) - break; } } else { - first += FT_NEXT_BYTE( p ); - points[i++] = first; + if ( p + cnt > stream->limit ) + goto Fail; - for ( j = 0; j < runcnt; j++ ) + for ( j = 0; j < cnt; j++ ) { first += FT_NEXT_BYTE( p ); points[i++] = first; - if ( i >= n ) - break; } } } stream->cursor = p; + *point_cnt = n; + return points; + + Fail: + FT_TRACE1(( "ft_var_readpackedpoints: invalid table\n" )); + + FT_FREE( points ); + return NULL; } @@ -244,9 +241,6 @@ * stream :: * The data stream. * - * size :: - * The size of the table holding the data. - * * delta_cnt :: * The number of deltas to be read. * @@ -262,13 +256,11 @@ */ static FT_Fixed* ft_var_readpackeddeltas( FT_Stream stream, - FT_ULong size, FT_UInt delta_cnt ) { FT_Fixed *deltas = NULL; FT_UInt runcnt, cnt; FT_UInt i, j; - FT_UInt bytes_used; FT_Byte* p; FT_Memory memory = stream->memory; FT_Error error; @@ -277,64 +269,44 @@ if ( FT_QNEW_ARRAY( deltas, delta_cnt ) ) return NULL; - p = stream->cursor; - i = 0; - bytes_used = 0; - - while ( i < delta_cnt && bytes_used < size ) + p = stream->cursor; + i = 0; + while ( i < delta_cnt ) { + if ( p >= stream->limit ) + { + goto Fail; + } + runcnt = FT_NEXT_BYTE( p ); cnt = runcnt & GX_DT_DELTA_RUN_COUNT_MASK; - bytes_used++; + /* first point not included in run count */ + cnt++; + if ( i + cnt > delta_cnt ) + cnt = delta_cnt - i; if ( runcnt & GX_DT_DELTAS_ARE_ZERO ) { - /* `cnt` + 1 zeroes get added */ - for ( j = 0; j <= cnt && i < delta_cnt; j++ ) + for ( j = 0; j < cnt; j++ ) deltas[i++] = 0; } else if ( runcnt & GX_DT_DELTAS_ARE_WORDS ) { - /* `cnt` + 1 shorts from the stack */ - bytes_used += 2 * ( cnt + 1 ); - if ( bytes_used > size ) - { - FT_TRACE1(( "ft_var_readpackeddeltas:" - " number of short deltas too large\n" )); + if ( p + 2 * cnt > stream->limit ) goto Fail; - } - for ( j = 0; j <= cnt && i < delta_cnt; j++ ) + for ( j = 0; j < cnt; j++ ) deltas[i++] = FT_intToFixed( FT_NEXT_SHORT( p ) ); } else { - /* `cnt` + 1 signed bytes from the stack */ - bytes_used += cnt + 1; - if ( bytes_used > size ) - { - FT_TRACE1(( "ft_var_readpackeddeltas:" - " number of byte deltas too large\n" )); + if ( p + cnt > stream->limit ) goto Fail; - } - for ( j = 0; j <= cnt && i < delta_cnt; j++ ) + for ( j = 0; j < cnt; j++ ) deltas[i++] = FT_intToFixed( FT_NEXT_CHAR( p ) ); } - - if ( j <= cnt ) - { - FT_TRACE1(( "ft_var_readpackeddeltas:" - " number of deltas too large\n" )); - goto Fail; - } - } - - if ( i < delta_cnt ) - { - FT_TRACE1(( "ft_var_readpackeddeltas: not enough deltas\n" )); - goto Fail; } stream->cursor = p; @@ -342,6 +314,8 @@ return deltas; Fail: + FT_TRACE1(( "ft_var_readpackeddeltas: invalid table\n" )); + FT_FREE( deltas ); return NULL; } @@ -3612,9 +3586,8 @@ FT_Stream_SeekSet( stream, offsetToData ); - sharedpoints = ft_var_readpackedpoints( stream, - table_len, - &spoint_count ); + sharedpoints = ft_var_readpackedpoints( stream, &spoint_count ); + offsetToData = FT_Stream_FTell( stream ); FT_Stream_SeekSet( stream, here ); @@ -3688,9 +3661,7 @@ if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS ) { - localpoints = ft_var_readpackedpoints( stream, - table_len, - &point_count ); + localpoints = ft_var_readpackedpoints( stream, &point_count ); points = localpoints; } else @@ -3701,7 +3672,6 @@ } deltas = ft_var_readpackeddeltas( stream, - table_len, point_count == 0 ? face->cvt_size : point_count ); @@ -4150,9 +4120,8 @@ FT_Stream_SeekSet( stream, offsetToData ); - sharedpoints = ft_var_readpackedpoints( stream, - blend->gvar_size, - &spoint_count ); + sharedpoints = ft_var_readpackedpoints( stream, &spoint_count ); + offsetToData = FT_Stream_FTell( stream ); FT_Stream_SeekSet( stream, here ); @@ -4236,9 +4205,7 @@ if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS ) { - localpoints = ft_var_readpackedpoints( stream, - blend->gvar_size, - &point_count ); + localpoints = ft_var_readpackedpoints( stream, &point_count ); points = localpoints; } else @@ -4248,11 +4215,9 @@ } deltas_x = ft_var_readpackeddeltas( stream, - blend->gvar_size, point_count == 0 ? n_points : point_count ); deltas_y = ft_var_readpackeddeltas( stream, - blend->gvar_size, point_count == 0 ? n_points : point_count ); From 7c75b8a7bdd738192a6aa1556bc38f72b6019e88 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 1 Aug 2024 19:14:44 -0400 Subject: [PATCH 181/191] [truetype/GX] Use more robust conditions. * src/truetype/ttgxvar.c (ft_var_readpacked{points,deltas}): Rewrite conditions to avoid undefined behavior. --- src/truetype/ttgxvar.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index b4325b1f8..22de98f9e 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -187,7 +187,7 @@ if ( runcnt & GX_PT_POINTS_ARE_WORDS ) { - if ( p + 2 * cnt > stream->limit ) + if ( 2 * cnt > (FT_UInt)( stream->limit - p ) ) goto Fail; for ( j = 0; j < cnt; j++ ) @@ -198,7 +198,7 @@ } else { - if ( p + cnt > stream->limit ) + if ( cnt > (FT_UInt)( stream->limit - p ) ) goto Fail; for ( j = 0; j < cnt; j++ ) @@ -274,9 +274,7 @@ while ( i < delta_cnt ) { if ( p >= stream->limit ) - { goto Fail; - } runcnt = FT_NEXT_BYTE( p ); cnt = runcnt & GX_DT_DELTA_RUN_COUNT_MASK; @@ -293,7 +291,7 @@ } else if ( runcnt & GX_DT_DELTAS_ARE_WORDS ) { - if ( p + 2 * cnt > stream->limit ) + if ( 2 * cnt > (FT_UInt)( stream->limit - p ) ) goto Fail; for ( j = 0; j < cnt; j++ ) @@ -301,7 +299,7 @@ } else { - if ( p + cnt > stream->limit ) + if ( cnt > (FT_UInt)( stream->limit - p ) ) goto Fail; for ( j = 0; j < cnt; j++ ) From 72e199e8d370ee1a4ca70ebedb0b2be794b7f508 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 1 Aug 2024 21:12:41 -0400 Subject: [PATCH 182/191] * src/base/ftstream.c (FT_Stream_ReadFields): Update condition. --- src/base/ftstream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/ftstream.c b/src/base/ftstream.c index 41fd913be..eca0980bd 100644 --- a/src/base/ftstream.c +++ b/src/base/ftstream.c @@ -763,10 +763,10 @@ case ft_frame_bytes: /* read a byte sequence */ case ft_frame_skip: /* skip some bytes */ { - FT_UInt len = fields->size; + FT_Int len = fields->size; - if ( cursor + len > stream->limit ) + if ( len > stream->limit - cursor ) { error = FT_THROW( Invalid_Stream_Operation ); goto Exit; From a48cdddef3f53c7dd6239f0fe92d723d5f550dc8 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Thu, 1 Aug 2024 21:15:46 -0400 Subject: [PATCH 183/191] * src/winfonts/winfnt.c (fnt_face_get_dll_font): Unwrap arithmetic. --- src/winfonts/winfnt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index 6dbe74bf5..74a06416c 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -359,8 +359,8 @@ if ( type_id == 0x8008U ) { font_count = count; - font_offset = FT_STREAM_POS() + 4 + - (FT_ULong)( stream->cursor - stream->limit ); + font_offset = FT_STREAM_POS() + 4 - + (FT_ULong)( stream->limit - stream->cursor ); break; } From e181911d878f8439a904fcf2ed27a1f5f730ac0a Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 5 Aug 2024 13:02:04 +0000 Subject: [PATCH 184/191] * src/base/ftstream.c (FT_Stream_ReadFields): Switch to `FT_Offset`. --- src/base/ftstream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/ftstream.c b/src/base/ftstream.c index eca0980bd..667222461 100644 --- a/src/base/ftstream.c +++ b/src/base/ftstream.c @@ -763,10 +763,10 @@ case ft_frame_bytes: /* read a byte sequence */ case ft_frame_skip: /* skip some bytes */ { - FT_Int len = fields->size; + FT_Offset len = fields->size; - if ( len > stream->limit - cursor ) + if ( len > (FT_Offset)( stream->limit - cursor ) ) { error = FT_THROW( Invalid_Stream_Operation ); goto Exit; From 1f72a120a9515b13741199fb3783c344e51bda8f Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Mon, 5 Aug 2024 13:05:51 +0000 Subject: [PATCH 185/191] * src/truetype/ttgxvar.c (ft_var_readpacked*): Minor. --- src/truetype/ttgxvar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 22de98f9e..396c38381 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -182,7 +182,7 @@ /* first point not included in run count */ cnt++; - if ( i + cnt > n ) + if ( cnt > n - i ) cnt = n - i; if ( runcnt & GX_PT_POINTS_ARE_WORDS ) @@ -281,7 +281,7 @@ /* first point not included in run count */ cnt++; - if ( i + cnt > delta_cnt ) + if ( cnt > delta_cnt - i ) cnt = delta_cnt - i; if ( runcnt & GX_DT_DELTAS_ARE_ZERO ) From ec378cecaf3cd656a9aa4bf237495d401521ae21 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 7 Aug 2024 21:23:44 +0200 Subject: [PATCH 186/191] tttables.h (FT_Get_CMap_Format): Minor documentation improvement. --- include/freetype/tttables.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h index 111f21802..2cf0ff1bc 100644 --- a/include/freetype/tttables.h +++ b/include/freetype/tttables.h @@ -838,8 +838,9 @@ FT_BEGIN_HEADER * The target charmap. * * @return: - * The format of `charmap`. If `charmap` doesn't belong to an SFNT face, - * return -1. + * The format of `charmap`. If `charmap` doesn't belong to an SFNT face + * (including the synthetic Unicode charmap sometimes created by + * FreeType), return -1. */ FT_EXPORT( FT_Long ) FT_Get_CMap_Format( FT_CharMap charmap ); From ed8b82ba9499a0dd460f5a0f110e5e3f9054e2ac Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 8 Aug 2024 10:28:05 +0200 Subject: [PATCH 187/191] Various minor documentation or formatting fixes. --- include/freetype/ftdriver.h | 2 +- include/freetype/ftimage.h | 7 +++--- include/freetype/internal/ftcalc.h | 4 ++-- meson.build | 34 ++++++++++++++++++------------ src/base/ftcalc.c | 18 ++++++++-------- src/sfnt/ttpost.c | 2 +- src/truetype/ttgxvar.c | 6 +++--- 7 files changed, 40 insertions(+), 33 deletions(-) diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h index dd31626b0..1b7f539f5 100644 --- a/include/freetype/ftdriver.h +++ b/include/freetype/ftdriver.h @@ -847,7 +847,7 @@ FT_BEGIN_HEADER * FT_Property_Set( library, "sdf", "spread", &spread ); * ``` * - * @note + * @note: * FreeType has two rasterizers for generating SDF, namely: * * 1. `sdf` for generating SDF directly from glyph's outline, and diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 6c7085f61..2b4b4ac60 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -21,9 +21,10 @@ * Note: A 'raster' is simply a scan-line converter, used to render * `FT_Outline`s into `FT_Bitmap`s. * - * Note: This file can be used for STANDALONE_ compilation of raster (B/W) - * and smooth (anti-aliased) renderers. Therefore, it must rely on - * standard variable types only rather than aliases in fttypes.h. + * Note: This file can be used for `STANDALONE_` compilation of raster + * (B/W) and smooth (anti-aliased) renderers. Therefore, it must + * rely on standard variable types only instead of aliases in + * `fttypes.h`. * */ diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index aba9b69a8..71128a2df 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -511,8 +511,8 @@ FT_BEGIN_HEADER * The result of 'sqrt(x)'. * * @note: - * This function is slow and should be avoided. Consider `FT_Hypot` or - * `FT_Vector_NormLen' instead. + * This function is slow and should be avoided. Consider @FT_Hypot or + * @FT_Vector_NormLen instead. */ FT_BASE( FT_UInt32 ) FT_SqrtFixed( FT_UInt32 x ); diff --git a/meson.build b/meson.build index 18d812499..12a319fec 100644 --- a/meson.build +++ b/meson.build @@ -231,7 +231,7 @@ endif # value from the environment, when this is supported. A smaller refactor # might make these platform-specific files much smaller, and could be moved # into `ftsystem.c` as well. -# + if host_machine.system() == 'windows' winmod = import('windows') ft2_sources += [ @@ -251,7 +251,7 @@ common_ldflags = [] # # OSX sets the compatibility_version (aka libtools version) differently from # the library name. -# + if host_machine.system() == 'darwin' # maintain compatibility with autotools on macOS common_ldflags = [ @@ -266,13 +266,13 @@ endif process_header_command = [python_exe, files('builds/meson/process_ftoption_h.py'), '@INPUT@', '--output=@OUTPUT@'] -ftoption_command = process_header_command +ftoption_command = process_header_command -# external GZip support +# External GZip support. zlib_option = get_option('zlib') -# Backwards-compatible aliases. +# Backward-compatible aliases. if zlib_option == 'disabled' zlib_option = 'none' elif zlib_option == 'enabled' @@ -315,10 +315,12 @@ else assert(false, 'Invalid zlib option ' + zlib_option) endif -# BZip2 support +# BZip2 support. bzip2_dep = dependency('bzip2', required: false) if not bzip2_dep.found() - bzip2_dep = cc.find_library('bz2', has_headers: ['bzlib.h'], required: get_option('bzip2')) + bzip2_dep = cc.find_library('bz2', + has_headers: ['bzlib.h'], + required: get_option('bzip2')) endif if bzip2_dep.found() @@ -327,7 +329,7 @@ if bzip2_dep.found() ft2_deps += [bzip2_dep] endif -# PNG support +# PNG support. libpng_dep = dependency('libpng', required: get_option('png'), fallback: 'libpng') @@ -337,7 +339,7 @@ if libpng_dep.found() ft2_deps += [libpng_dep] endif -# Harfbuzz support +# Harfbuzz support. harfbuzz_dep = dependency('harfbuzz', version: '>= 2.0.0', required: get_option('harfbuzz'), @@ -348,7 +350,7 @@ if harfbuzz_dep.found() ft2_deps += [harfbuzz_dep] endif -# Brotli decompression support +# Brotli decompression support. brotli_dep = dependency('libbrotlidec', required: get_option('brotli')) @@ -376,6 +378,7 @@ endif # Generate `ftconfig.h`. ftconfig_command = process_header_command + if has_unistd_h ftconfig_command += '--enable=HAVE_UNISTD_H' endif @@ -409,7 +412,8 @@ ft2_lib = library('freetype', ) -# To be used by other projects including this one through `subproject`. +# To be used by other projects including this one via `subproject`. + freetype_dep = declare_dependency( include_directories: ft2_includes, link_with: ft2_lib, @@ -418,9 +422,9 @@ freetype_dep = declare_dependency( meson.override_dependency('freetype2', freetype_dep) -# NOTE: Using both `install_dir` and `subdir` doesn't seem to work below, -# i.e., the subdir value seems to be ignored, contrary to examples in the -# Meson documentation. +# NOTE: Using both `install_dir` and `subdir` doesn't seem to work +# below, i.e., the `subdir` value seems to be ignored, contrary to +# examples in the Meson documentation. install_headers('include/ft2build.h', install_dir: freetype_includedir) install_headers(ft2_public_headers, @@ -444,9 +448,11 @@ if get_option('tests').enabled() subdir('tests') endif + # NOTE: Unlike the old `make refdoc` command, this generates the # documentation under `$BUILD/docs/` since Meson doesn't support modifying # the source root directory (which is a good thing). + gen_docs = custom_target('freetype2 reference documentation', output: 'docs', input: ft2_public_headers + ft2_config_headers, diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index 5851dae16..92de09ed8 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -897,11 +897,11 @@ #ifndef FT_INT64 - /* Algorithm by Christophe Meessen (1993) with overflow fixed and */ - /* rounding added. Any unsigned fixed 16.16 argument is acceptable. */ - /* However, this algorithm is slower than the Babylonian method with */ - /* a good initial guess. We only use it for large 32-bit values when */ - /* 64-bit computations are not desirable. */ + /* Algorithm by Christophe Meessen (1993) with overflow fixed and */ + /* rounding added. Any unsigned fixed 16.16 argument is acceptable. */ + /* However, this algorithm is slower than the Babylonian method with */ + /* a good initial guess. We only use it for large 32-bit values when */ + /* 64-bit computations are not desirable. */ else if ( v > 0x10000U ) { FT_UInt32 r = v >> 1; @@ -920,8 +920,8 @@ } r <<= 1; b >>= 1; - } - while ( b > 0x10 ); /* exactly 25 cycles */ + + } while ( b > 0x10 ); /* exactly 25 cycles */ return ( q + 0x40 ) >> 7; } @@ -946,8 +946,8 @@ { t = q; q = ( t + (FT_UInt32)( r / t ) + 1 ) >> 1; - } - while ( q != t ); /* less than 6 cycles */ + + } while ( q != t ); /* less than 6 cycles */ return q; } diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index a90237ad0..dd798d2b2 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -226,7 +226,7 @@ FT_UInt len = *p; - /* all names in Adobe Glyph List are shorter than 40 characters */ + /* names in the Adobe Glyph List are shorter than 40 characters */ if ( len >= 40U ) FT_TRACE4(( "load_format_20: unusual %u-char name found\n", len )); diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 396c38381..4f0083c96 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -2115,7 +2115,7 @@ /* Convert delta in F2DOT14 to 16.16 before adding. */ v += MUL_INT( delta, 4 ); - /* Clamp value range [-1, 1]. */ + /* Clamp value to range [-1, 1]. */ v = v >= 0x10000L ? 0x10000 : v; v = v <= -0x10000L ? -0x10000 : v; @@ -3770,8 +3770,8 @@ for ( i = 0; i < face->cvt_size; i++ ) face->cvt[i] += FT_fixedToFdot6( cvt_deltas[i] ); - /* iterate over all FT_Size objects and set `cvt_ready' to -1 */ - /* to trigger rescaling of all CVT values */ + /* Iterate over all `FT_Size` objects and set `cvt_ready` to -1 */ + /* to trigger rescaling of all CVT values. */ FT_List_Iterate( &root->sizes_list, tt_cvt_ready_iterator, NULL ); From 8fc8b1310e2b39fdd952903bc2cf141e923edcc1 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 11 Aug 2024 18:37:48 +0200 Subject: [PATCH 188/191] * subprojects/*.wrap: Updated. --- subprojects/libpng.wrap | 18 +++++++++--------- subprojects/zlib.wrap | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/subprojects/libpng.wrap b/subprojects/libpng.wrap index eb0785d9d..2c5f9c6a2 100644 --- a/subprojects/libpng.wrap +++ b/subprojects/libpng.wrap @@ -1,13 +1,13 @@ [wrap-file] -directory = libpng-1.6.40 -source_url = https://github.com/glennrp/libpng/archive/v1.6.40.tar.gz -source_filename = libpng-1.6.40.tar.gz -source_hash = 62d25af25e636454b005c93cae51ddcd5383c40fa14aa3dae8f6576feb5692c2 -patch_filename = libpng_1.6.40-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.40-1/get_patch -patch_hash = bad558070e0a82faa5c0ae553bcd12d49021fc4b628f232a8e58c3fbd281aae1 -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libpng_1.6.40-1/libpng-1.6.40.tar.gz -wrapdb_version = 1.6.40-1 +directory = libpng-1.6.43 +source_url = https://github.com/glennrp/libpng/archive/v1.6.43.tar.gz +source_filename = libpng-1.6.43.tar.gz +source_hash = fecc95b46cf05e8e3fc8a414750e0ba5aad00d89e9fdf175e94ff041caf1a03a +patch_filename = libpng_1.6.43-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.43-2/get_patch +patch_hash = 49951297edf03e81d925ab03726555f09994ad1ed78fb539a269216430eef3da +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libpng_1.6.43-2/libpng-1.6.43.tar.gz +wrapdb_version = 1.6.43-2 [provide] libpng = libpng_dep diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap index f9f118038..aa14de177 100644 --- a/subprojects/zlib.wrap +++ b/subprojects/zlib.wrap @@ -1,13 +1,13 @@ [wrap-file] -directory = zlib-1.3 -source_url = http://zlib.net/fossils/zlib-1.3.tar.gz -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3-1/zlib-1.3.tar.gz -source_filename = zlib-1.3.tar.gz -source_hash = ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e -patch_filename = zlib_1.3-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3-1/get_patch -patch_hash = ab9d6b8167bb34a7c52b60b0cd6138aa4e0c2d31f997343a5f506f3b97b32008 -wrapdb_version = 1.3-1 +directory = zlib-1.3.1 +source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-1/zlib-1.3.1.tar.gz +source_filename = zlib-1.3.1.tar.gz +source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 +patch_filename = zlib_1.3.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch +patch_hash = e79b98eb24a75392009cec6f99ca5cdca9881ff20bfa174e8b8926d5c7a47095 +wrapdb_version = 1.3.1-1 [provide] zlib = zlib_dep From 6b992aaaf27c2d8bdb9541c4bae56d152b8abe5a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 11 Aug 2024 19:44:13 +0200 Subject: [PATCH 189/191] * src/*/*: Fix C++ compilation; fix clang warnings. --- src/cache/ftcbasic.c | 5 +++-- src/psaux/psintrp.c | 4 ++-- src/sfnt/ttgpos.c | 24 ++++++++---------------- src/sfnt/ttpost.c | 2 +- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 04f664fad..7102d3d2d 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -45,8 +45,9 @@ FT_BOOL( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \ (a)->load_flags == (b)->load_flags ) -#define FTC_BASIC_ATTR_HASH( a ) \ - ( FTC_SCALER_HASH( &(a)->scaler ) + 31 * (a)->load_flags ) +#define FTC_BASIC_ATTR_HASH( a ) \ + ( FTC_SCALER_HASH( &(a)->scaler ) + \ + (FT_Offset)( 31 * (a)->load_flags ) ) typedef struct FTC_BasicQueryRec_ diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index 6b445a996..7572e225e 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -445,7 +445,7 @@ cf2_stack_getReal( opStack, delta++ ) ) ); - FT_TRACE6(( "%f ", (float) sum / 65536 )); + FT_TRACE6(( "%f ", (double)sum / 65536 )); /* store blended result */ cf2_stack_setReal( opStack, i + base, sum ); @@ -2282,7 +2282,7 @@ arg = cf2_stack_popFixed( opStack ); if ( arg > 0 ) - arg = (CF2_F16Dot16)FT_SqrtFixed( arg ); + arg = (CF2_F16Dot16)FT_SqrtFixed( (FT_UInt32)arg ); else arg = 0; diff --git a/src/sfnt/ttgpos.c b/src/sfnt/ttgpos.c index c5dd043d6..b6cd8bf82 100644 --- a/src/sfnt/ttgpos.c +++ b/src/sfnt/ttgpos.c @@ -58,6 +58,7 @@ typedef enum gpos_lookup_type_ { + GPOS_LOOKUP_TYPE_NONE = 0, GPOS_LOOKUP_TYPE_SINGLE_ADJUSTMENT = 1, GPOS_LOOKUP_TYPE_PAIR_ADJUSTMENT = 2, GPOS_LOOKUP_TYPE_CURSIVE_ATTACHMENT = 3, @@ -132,14 +133,14 @@ else { context->current_lookup_table = NULL; - context->current_lookup_type = 0; + context->current_lookup_type = GPOS_LOOKUP_TYPE_NONE; context->subtable_count = 0; context->subtable_offsets = NULL; } context->subtable_idx = 0; context->subtable = NULL; - context->subtable_type = 0; + context->subtable_type = GPOS_LOOKUP_TYPE_NONE; } @@ -195,7 +196,7 @@ FT_Int m; FT_Int straw; - FT_Int needle = glyph; + FT_Int needle = (FT_Int)glyph; /* Binary search. */ @@ -230,7 +231,7 @@ FT_Int straw_start; FT_Int straw_end; - FT_Int needle = glyph; + FT_Int needle = (FT_Int)glyph; /* Binary search. */ @@ -254,14 +255,11 @@ FT_PEEK_USHORT( range_record + 4 ); - return start_coverage_index + glyph - straw_start; + return (FT_Int)start_coverage_index + (FT_Int)glyph - straw_start; } } break; } - - default: - return -1; /* unsupported */ } return -1; @@ -303,7 +301,7 @@ FT_Int straw_start; FT_Int straw_end; - FT_Int needle = glyph; + FT_Int needle = (FT_Int)glyph; while ( l <= r ) @@ -325,9 +323,6 @@ } break; } - - default: - return -1; /* Unsupported definition type, return an error. */ } /* "All glyphs not assigned to a class fall into class 0." */ @@ -514,7 +509,7 @@ pair_value_count = FT_PEEK_USHORT( pair_value_table ); pair_value_array = pair_value_table + 2; - needle = right_glyph; + needle = (FT_Int)right_glyph; r = pair_value_count - 1; l = 0; @@ -584,9 +579,6 @@ return x_advance; } - - default: - return 0; } } } diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index dd798d2b2..5698a62c8 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -240,7 +240,7 @@ if ( n < num_names ) { FT_TRACE4(( "load_format_20: %hu PostScript names are truncated\n", - num_names - n )); + (FT_UShort)( num_names - n ) )); for ( ; n < num_names; n++ ) name_strings[n] = p_end; From a4b4e3ec23200ff486820d5ee6a8e42f470eca38 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 12 Aug 2024 12:43:14 +0200 Subject: [PATCH 190/191] * meson.build: Install `freetype2.m4`. Fixes #1290. --- meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meson.build b/meson.build index 12a319fec..bedf13246 100644 --- a/meson.build +++ b/meson.build @@ -54,6 +54,9 @@ freetype_includedir = join_paths(get_option('includedir'), 'freetype2') ft2_defines = [] +freetype_aclocaldir = join_paths(get_option('datadir'), 'aclocal') + + # Generate a custom `ftmodule.h` version based on the content of # `modules.cfg`. @@ -433,6 +436,10 @@ install_headers(ft2_config_headers, install_dir: join_paths(freetype_includedir, 'freetype/config')) +install_data('builds/unix/freetype2.m4', + install_dir: freetype_aclocaldir) + + pkgconfig = import('pkgconfig') pkgconfig.generate(ft2_lib, From 42608f77f20749dd6ddc9e0536788eaad70ea4b5 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 11 Aug 2024 20:30:23 +0200 Subject: [PATCH 191/191] * Version 2.13.3 released. ========================== Tag sources with `VER-2-13-3'. * docs/VERSION.TXT: Add entry for version 2.13.3. * docs/CHANGES: Updated. * docs/release, docs/README, builds/macs/README: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.13.2/2.13.3/, s/2132/2133/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 26:2:20. * CMakeLists.txt (VERSION_PATCH): Set to 3. --- CMakeLists.txt | 2 +- README | 8 ++++---- builds/unix/configure.raw | 2 +- builds/wince/vc2005-ce/index.html | 2 +- builds/wince/vc2008-ce/index.html | 2 +- builds/windows/vc2010/index.html | 2 +- builds/windows/visualc/index.html | 2 +- builds/windows/visualce/index.html | 2 +- docs/CHANGES | 6 +++--- docs/VERSIONS.TXT | 1 + docs/freetype-config.1 | 2 +- include/freetype/freetype.h | 2 +- src/base/ftver.rc | 6 +++--- 13 files changed, 20 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fb959c0b..36516e4ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,7 @@ project(freetype C) set(VERSION_MAJOR "2") set(VERSION_MINOR "13") -set(VERSION_PATCH "2") +set(VERSION_PATCH "3") # Generate LIBRARY_VERSION and LIBRARY_SOVERSION. set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'") diff --git a/README b/README index 19c934256..0f5d3e0e0 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -FreeType 2.13.2 +FreeType 2.13.3 =============== Homepage: https://www.freetype.org @@ -32,9 +32,9 @@ sites. Go to and download one of the following files. - freetype-doc-2.13.2.tar.xz - freetype-doc-2.13.2.tar.gz - ftdoc2132.zip + freetype-doc-2.13.3.tar.xz + freetype-doc-2.13.3.tar.gz + ftdoc2133.zip To view the documentation online, go to diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index b3e056d55..7a795cbc0 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='26:1:20' +version_info='26:2:20' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) diff --git a/builds/wince/vc2005-ce/index.html b/builds/wince/vc2005-ce/index.html index 8ea6cfded..2505d7762 100644 --- a/builds/wince/vc2005-ce/index.html +++ b/builds/wince/vc2005-ce/index.html @@ -21,7 +21,7 @@

  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.13.2 sources:

    +It compiles the following libraries from the FreeType 2.13.3 sources:

      diff --git a/builds/wince/vc2008-ce/index.html b/builds/wince/vc2008-ce/index.html
      index a6e74f893..80a30eb16 100644
      --- a/builds/wince/vc2008-ce/index.html
      +++ b/builds/wince/vc2008-ce/index.html
      @@ -21,7 +21,7 @@ 

    • PPC/SP WM6 (Windows Mobile 6)
    -It compiles the following libraries from the FreeType 2.13.2 sources:

    +It compiles the following libraries from the FreeType 2.13.3 sources:

      diff --git a/builds/windows/vc2010/index.html b/builds/windows/vc2010/index.html
      index ee9b59a2b..03149d223 100644
      --- a/builds/windows/vc2010/index.html
      +++ b/builds/windows/vc2010/index.html
      @@ -12,7 +12,7 @@ 

      This directory contains solution and project files for Visual C++ 2010 or newer, named freetype.sln, and freetype.vcxproj. It compiles the following libraries -from the FreeType 2.13.2 sources:

      +from the FreeType 2.13.3 sources:

      • freetype.dll using 'Release' or 'Debug' configurations
      • diff --git a/builds/windows/visualc/index.html b/builds/windows/visualc/index.html index 816605e07..b3102e575 100644 --- a/builds/windows/visualc/index.html +++ b/builds/windows/visualc/index.html @@ -12,7 +12,7 @@

        This directory contains project files freetype.dsp for Visual C++ 6.0, and freetype.vcproj for Visual C++ 2002 through 2008, which you might need to upgrade automatically. -It compiles the following libraries from the FreeType 2.13.2 sources:

        +It compiles the following libraries from the FreeType 2.13.3 sources:

        • freetype.dll using 'Release' or 'Debug' configurations
        • diff --git a/builds/windows/visualce/index.html b/builds/windows/visualce/index.html index d9c8fe475..db9246c0a 100644 --- a/builds/windows/visualce/index.html +++ b/builds/windows/visualce/index.html @@ -21,7 +21,7 @@

        • PPC/SP WM6 (Windows Mobile 6)
        -It compiles the following libraries from the FreeType 2.13.2 sources:

        +It compiles the following libraries from the FreeType 2.13.3 sources:

          diff --git a/docs/CHANGES b/docs/CHANGES
          index 4c98128f8..bd7b12a8a 100644
          --- a/docs/CHANGES
          +++ b/docs/CHANGES
          @@ -1,4 +1,4 @@
          -CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Mmm-DD)
          +CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Aug-11)
           
             I. IMPORTANT CHANGES
           
          @@ -17,8 +17,8 @@ CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Mmm-DD)
           
             III. MISCELLANEOUS
           
          -  - The B/W rasterizer  has  received a major upkeep  that resulted in
          -    large performance improvement.  The rendering speed  has increased
          +  - The B/W  rasterizer has  received a major  upkeep that  results in
          +    large performance improvements.  The rendering speed has increased
               and even doubled for very complex glyphs.
           
             - If the new configuration option `TT_CONFIG_OPTION_GPOS_KERNING` is
          diff --git a/docs/VERSIONS.TXT b/docs/VERSIONS.TXT
          index 62481cb7f..a84067dfe 100644
          --- a/docs/VERSIONS.TXT
          +++ b/docs/VERSIONS.TXT
          @@ -60,6 +60,7 @@ found on _most_ systems, but not all of them:
           
               release     libtool     so
             -------------------------------
          +     2.13.3     26.2.20   6.20.2
                2.13.2     26.1.20   6.20.1
                2.13.1     26.0.20   6.20.0
                2.13.0     25.0.19   6.19.0
          diff --git a/docs/freetype-config.1 b/docs/freetype-config.1
          index 6ef1ac8f3..f52a4e6af 100644
          --- a/docs/freetype-config.1
          +++ b/docs/freetype-config.1
          @@ -1,4 +1,4 @@
          -.TH FREETYPE-CONFIG 1 "August 2023" "FreeType 2.13.2"
          +.TH FREETYPE-CONFIG 1 "August 2024" "FreeType 2.13.3"
           .
           .
           .SH NAME
          diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
          index b88ccc608..58fc33dfe 100644
          --- a/include/freetype/freetype.h
          +++ b/include/freetype/freetype.h
          @@ -5174,7 +5174,7 @@ FT_BEGIN_HEADER
              */
           #define FREETYPE_MAJOR  2
           #define FREETYPE_MINOR  13
          -#define FREETYPE_PATCH  2
          +#define FREETYPE_PATCH  3
           
           
             /**************************************************************************
          diff --git a/src/base/ftver.rc b/src/base/ftver.rc
          index 62490c063..3175ab7de 100644
          --- a/src/base/ftver.rc
          +++ b/src/base/ftver.rc
          @@ -18,8 +18,8 @@
           
           #include
           
          -#define FT_VERSION      2,13,2,0
          -#define FT_VERSION_STR  "2.13.2"
          +#define FT_VERSION      2,13,3,0
          +#define FT_VERSION_STR  "2.13.3"
           
           VS_VERSION_INFO      VERSIONINFO
           FILEVERSION          FT_VERSION
          @@ -45,7 +45,7 @@ BEGIN
                 VALUE "FileVersion",      FT_VERSION_STR
                 VALUE "ProductName",      "FreeType"
                 VALUE "ProductVersion",   FT_VERSION_STR
          -      VALUE "LegalCopyright",   L"\x00A9 2000-2023 The FreeType Project www.freetype.org. All rights reserved."
          +      VALUE "LegalCopyright",   L"\x00A9 2000-2024 The FreeType Project www.freetype.org. All rights reserved."
                 VALUE "InternalName",     "freetype"
                 VALUE "OriginalFilename", FT_FILENAME
               END