diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-09-01 05:58:30 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-09-01 05:58:30 +0000 |
commit | 5f2b26791fe1a95ce022cb5e3dc21e389410d8cb (patch) | |
tree | 3f2032da43885b6530190de5e2c09b85b571c87b /Build/source/libs/freetype2/freetype-src/src/cid | |
parent | 5b0099f6c7a0e15e36b0f556f41332724fbec7f6 (diff) |
freetype 2.11.0
git-svn-id: svn://tug.org/texlive/trunk@60386 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/cid')
15 files changed, 41 insertions, 44 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/ciderrs.h b/Build/source/libs/freetype2/freetype-src/src/cid/ciderrs.h index f698bb22936..2d762d9e1d1 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/ciderrs.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/ciderrs.h @@ -4,7 +4,7 @@ * * CID error codes (specification only). * - * Copyright (C) 2001-2020 by + * Copyright (C) 2001-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.c index 54aa62f8104..bd0a7e7fb10 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.c +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 Glyph Loader (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -85,10 +85,10 @@ if ( glyph_data.length != 0 ) { glyph_length = (FT_ULong)( glyph_data.length - cid->fd_bytes ); - (void)FT_ALLOC( charstring, glyph_length ); - if ( !error ) - ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes, - glyph_length ); + + if ( !FT_QALLOC( charstring, glyph_length ) ) + FT_MEM_COPY( charstring, glyph_data.pointer + cid->fd_bytes, + glyph_length ); } inc->funcs->free_glyph_data( inc->object, &glyph_data ); @@ -130,11 +130,10 @@ } glyph_length = off2 - off1; - if ( glyph_length == 0 ) - goto Exit; - if ( FT_ALLOC( charstring, glyph_length ) ) - goto Exit; - if ( FT_STREAM_READ_AT( cid->data_offset + off1, + + if ( glyph_length == 0 || + FT_QALLOC( charstring, glyph_length ) || + FT_STREAM_READ_AT( cid->data_offset + off1, charstring, glyph_length ) ) goto Exit; } diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.h index da36e37e069..8b515efa01c 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidload.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidload.c index bb9136a3df8..7fd0d7c78c2 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidload.c +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -552,7 +552,7 @@ goto Fail; } - if ( FT_RENEW_ARRAY( offsets, max_offsets, new_max ) ) + if ( FT_QRENEW_ARRAY( offsets, max_offsets, new_max ) ) goto Fail; max_offsets = new_max; @@ -589,8 +589,8 @@ /* allocate, and read them */ data_len = offsets[num_subrs] - offsets[0]; - if ( FT_NEW_ARRAY( subr->code, num_subrs + 1 ) || - FT_ALLOC( subr->code[0], data_len ) ) + if ( FT_QNEW_ARRAY( subr->code, num_subrs + 1 ) || + FT_QALLOC( subr->code[0], data_len ) ) goto Fail; if ( FT_STREAM_SEEK( cid->data_offset + offsets[0] ) || @@ -665,17 +665,18 @@ static FT_Error - cid_hex_to_binary( FT_Byte* data, - FT_ULong data_len, - FT_ULong offset, - CID_Face face ) + cid_hex_to_binary( FT_Byte* data, + FT_ULong data_len, + FT_ULong offset, + CID_Face face, + FT_ULong* data_written ) { FT_Stream stream = face->root.stream; FT_Error error; FT_Byte buffer[256]; FT_Byte *p, *plimit; - FT_Byte *d, *dlimit; + FT_Byte *d = data, *dlimit; FT_Byte val; FT_Bool upper_nibble, done; @@ -684,7 +685,6 @@ if ( FT_STREAM_SEEK( offset ) ) goto Exit; - d = data; dlimit = d + data_len; p = buffer; plimit = p; @@ -758,6 +758,7 @@ error = FT_Err_Ok; Exit: + *data_written = (FT_ULong)( d - data ); return error; } @@ -803,8 +804,8 @@ if ( parser->binary_length > face->root.stream->size - parser->data_offset ) { - FT_TRACE0(( "cid_face_open: adjusting length of binary data\n" - " (from %ld to %ld bytes)\n", + FT_TRACE0(( "cid_face_open: adjusting length of binary data\n" )); + FT_TRACE0(( " (from %ld to %ld bytes)\n", parser->binary_length, face->root.stream->size - parser->data_offset )); parser->binary_length = face->root.stream->size - @@ -812,15 +813,16 @@ } /* we must convert the data section from hexadecimal to binary */ - if ( FT_ALLOC( face->binary_data, parser->binary_length ) || + if ( FT_QALLOC( face->binary_data, parser->binary_length ) || FT_SET_ERROR( cid_hex_to_binary( face->binary_data, parser->binary_length, parser->data_offset, - face ) ) ) + face, + &binary_length ) ) ) goto Exit; FT_Stream_OpenMemory( face->cid_stream, - face->binary_data, parser->binary_length ); + face->binary_data, binary_length ); cid->data_offset = 0; } else @@ -843,8 +845,8 @@ if ( cid->fd_bytes > 4 || cid->gd_bytes > 4 ) { FT_ERROR(( "cid_face_open:" - " Values of `FDBytes' or `GDBytes' larger than 4\n" - " " + " Values of `FDBytes' or `GDBytes' larger than 4\n" )); + FT_ERROR(( " " " are not supported\n" )); error = FT_THROW( Invalid_File_Format ); goto Exit; diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidload.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidload.h index 06fb9ef4767..456685c2af1 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidload.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidload.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (specification). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.c index 04b295eb8f3..c7568118547 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.c +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.c @@ -4,7 +4,7 @@ * * CID objects manager (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -479,11 +479,7 @@ /* set default property values, cf. `ftt1drv.h' */ -#ifdef T1_CONFIG_OPTION_OLD_ENGINE - driver->hinting_engine = FT_HINTING_FREETYPE; -#else driver->hinting_engine = FT_HINTING_ADOBE; -#endif driver->no_stem_darkening = TRUE; diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.h index 6ae3061379c..32f59cbcceb 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.h @@ -4,7 +4,7 @@ * * CID objects manager (specification). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.c index 1fc098b448e..a28f8ee5590 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.c +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.h index 0b49bebf488..6a00c6cee12 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (specification). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.c index d08cea1d7e8..a0898dfa2fd 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.c +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.c @@ -4,7 +4,7 @@ * * CID driver interface (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.h index 0fc8ed37bf2..3ff5f78e11a 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.h @@ -4,7 +4,7 @@ * * High-level CID driver interface (specification). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/cidtoken.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidtoken.h index e9f068bb501..84c8258014d 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/cidtoken.h +++ b/Build/source/libs/freetype2/freetype-src/src/cid/cidtoken.h @@ -4,7 +4,7 @@ * * CID token definitions (specification only). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/cid/module.mk b/Build/source/libs/freetype2/freetype-src/src/cid/module.mk index 9fb02235e6f..2e16262b3a2 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/module.mk +++ b/Build/source/libs/freetype2/freetype-src/src/cid/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 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/Build/source/libs/freetype2/freetype-src/src/cid/rules.mk b/Build/source/libs/freetype2/freetype-src/src/cid/rules.mk index 94f663c80e3..933b2daf783 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/rules.mk +++ b/Build/source/libs/freetype2/freetype-src/src/cid/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 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/Build/source/libs/freetype2/freetype-src/src/cid/type1cid.c b/Build/source/libs/freetype2/freetype-src/src/cid/type1cid.c index 082e8bfe5b3..5405ecffc8f 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cid/type1cid.c +++ b/Build/source/libs/freetype2/freetype-src/src/cid/type1cid.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, |