diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-08-29 06:19:44 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-08-29 06:19:44 +0000 |
commit | 0de5be92a3a0fe27e8521fc4de67e19b1057842e (patch) | |
tree | e93a390fe965486cca19498840cb8d7904252fec /Build/source/libs/freetype2/freetype-src/src/cff | |
parent | 27ce96eea3f1190bd744448cfa149e8d767af95a (diff) |
revert freetype to 2.10.4
git-svn-id: svn://tug.org/texlive/trunk@60360 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/cff')
17 files changed, 72 insertions, 62 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/cff/cff.c b/Build/source/libs/freetype2/freetype-src/src/cff/cff.c index c2ffea3d0d5..0fa6c87870b 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cff.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cff.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cffcmap.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffcmap.c index ff1aae69efa..6d16ed42264 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffcmap.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffcmap.c @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2020 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/cff/cffcmap.h b/Build/source/libs/freetype2/freetype-src/src/cff/cffcmap.h index 221e255afb5..69fab8dc6c0 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffcmap.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffcmap.h @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2020 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/cff/cffdrivr.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.c index 9bde3c7b7f9..486ab242353 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.c @@ -4,7 +4,7 @@ * * OpenType font driver implementation (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -345,8 +345,8 @@ else { FT_ERROR(( "cff_get_glyph_name:" - " cannot get glyph name from a CFF2 font\n" )); - FT_ERROR(( " " + " cannot get glyph name from a CFF2 font\n" + " " " without the `psnames' module\n" )); error = FT_THROW( Missing_Module ); goto Exit; @@ -356,8 +356,8 @@ if ( !font->psnames ) { FT_ERROR(( "cff_get_glyph_name:" - " cannot get glyph name from CFF & CEF fonts\n" )); - FT_ERROR(( " " + " cannot get glyph name from CFF & CEF fonts\n" + " " " without the `psnames' module\n" )); error = FT_THROW( Missing_Module ); goto Exit; @@ -412,8 +412,8 @@ else { FT_ERROR(( "cff_get_name_index:" - " cannot get glyph index from a CFF2 font\n" )); - FT_ERROR(( " " + " cannot get glyph index from a CFF2 font\n" + " " " without the `psnames' module\n" )); return 0; } @@ -478,7 +478,7 @@ FT_Memory memory = face->root.memory; - if ( FT_QALLOC( font_info, sizeof ( *font_info ) ) ) + if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) ) goto Fail; font_info->version = cff_index_get_sid_string( cff, diff --git a/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.h b/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.h index fce92bbb006..d198dd35cb4 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffdrivr.h @@ -4,7 +4,7 @@ * * High-level OpenType driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cfferrs.h b/Build/source/libs/freetype2/freetype-src/src/cff/cfferrs.h index b507ec8bb77..5b00a3f0a2e 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cfferrs.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cfferrs.h @@ -4,7 +4,7 @@ * * CFF error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2020 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/cff/cffgload.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c index 831b3ae1df2..feee38a4131 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cffgload.h b/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.h index d0d6a6fa080..3b312f452e1 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cffload.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c index 4a4010d6147..73d3eecd313 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c @@ -4,7 +4,7 @@ * * OpenType and CFF data/program tables loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -356,9 +356,9 @@ data_size = (FT_ULong)( idx->count + 1 ) * offsize; - if ( FT_QNEW_ARRAY( idx->offsets, idx->count + 1 ) || - FT_STREAM_SEEK( idx->start + idx->hdr_size ) || - FT_FRAME_ENTER( data_size ) ) + if ( FT_NEW_ARRAY( idx->offsets, idx->count + 1 ) || + FT_STREAM_SEEK( idx->start + idx->hdr_size ) || + FT_FRAME_ENTER( data_size ) ) goto Exit; poff = idx->offsets; @@ -427,7 +427,7 @@ new_size = idx->data_size + idx->count; if ( idx->count > 0 && - !FT_QNEW_ARRAY( tbl, idx->count + 1 ) && + !FT_NEW_ARRAY( tbl, idx->count + 1 ) && ( !pool || !FT_ALLOC( new_bytes, new_size ) ) ) { FT_ULong n, cur_offset; @@ -634,9 +634,10 @@ if ( error ) goto Exit; - if ( !FT_QALLOC( name, byte_len + 1 ) ) + if ( !FT_ALLOC( name, byte_len + 1 ) ) { - FT_MEM_COPY( name, bytes, byte_len ); + if ( byte_len ) + FT_MEM_COPY( name, bytes, byte_len ); name[byte_len] = 0; } cff_index_forget_element( idx, &bytes ); @@ -931,7 +932,7 @@ goto Exit; /* Allocate memory for sids. */ - if ( FT_QNEW_ARRAY( charset->sids, num_glyphs ) ) + if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) ) goto Exit; /* assign the .notdef glyph */ @@ -1017,14 +1018,14 @@ case 0: if ( num_glyphs > 229 ) { - FT_ERROR(( "cff_charset_load: implicit charset larger than\n" )); - FT_ERROR(( "predefined charset (Adobe ISO-Latin)\n" )); + FT_ERROR(( "cff_charset_load: implicit charset larger than\n" + "predefined charset (Adobe ISO-Latin)\n" )); error = FT_THROW( Invalid_File_Format ); goto Exit; } /* Allocate memory for sids. */ - if ( FT_QNEW_ARRAY( charset->sids, num_glyphs ) ) + if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) ) goto Exit; /* Copy the predefined charset into the allocated memory. */ @@ -1035,14 +1036,14 @@ case 1: if ( num_glyphs > 166 ) { - FT_ERROR(( "cff_charset_load: implicit charset larger than\n" )); - FT_ERROR(( "predefined charset (Adobe Expert)\n" )); + FT_ERROR(( "cff_charset_load: implicit charset larger than\n" + "predefined charset (Adobe Expert)\n" )); error = FT_THROW( Invalid_File_Format ); goto Exit; } /* Allocate memory for sids. */ - if ( FT_QNEW_ARRAY( charset->sids, num_glyphs ) ) + if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) ) goto Exit; /* Copy the predefined charset into the allocated memory. */ @@ -1053,14 +1054,14 @@ case 2: if ( num_glyphs > 87 ) { - FT_ERROR(( "cff_charset_load: implicit charset larger than\n" )); - FT_ERROR(( "predefined charset (Adobe Expert Subset)\n" )); + FT_ERROR(( "cff_charset_load: implicit charset larger than\n" + "predefined charset (Adobe Expert Subset)\n" )); error = FT_THROW( Invalid_File_Format ); goto Exit; } /* Allocate memory for sids. */ - if ( FT_QNEW_ARRAY( charset->sids, num_glyphs ) ) + if ( FT_NEW_ARRAY( charset->sids, num_glyphs ) ) goto Exit; /* Copy the predefined charset into the allocated memory. */ @@ -1086,6 +1087,7 @@ FT_FREE( charset->cids ); charset->format = 0; charset->offset = 0; + charset->sids = 0; } return error; @@ -1167,7 +1169,7 @@ /* make temporary copy of item variation data offsets; */ /* we'll parse region list first, then come back */ - if ( FT_QNEW_ARRAY( dataOffsetArray, vstore->dataCount ) ) + if ( FT_NEW_ARRAY( dataOffsetArray, vstore->dataCount ) ) goto Exit; for ( i = 0; i < vstore->dataCount; i++ ) @@ -1182,7 +1184,7 @@ FT_READ_USHORT( vstore->regionCount ) ) goto Exit; - if ( FT_QNEW_ARRAY( vstore->varRegionList, vstore->regionCount ) ) + if ( FT_NEW_ARRAY( vstore->varRegionList, vstore->regionCount ) ) goto Exit; for ( i = 0; i < vstore->regionCount; i++ ) @@ -1190,7 +1192,7 @@ CFF_VarRegion* region = &vstore->varRegionList[i]; - if ( FT_QNEW_ARRAY( region->axisList, vstore->axisCount ) ) + if ( FT_NEW_ARRAY( region->axisList, vstore->axisCount ) ) goto Exit; for ( j = 0; j < vstore->axisCount; j++ ) @@ -1212,7 +1214,7 @@ } /* use dataOffsetArray now to parse varData items */ - if ( FT_QNEW_ARRAY( vstore->varData, vstore->dataCount ) ) + if ( FT_NEW_ARRAY( vstore->varData, vstore->dataCount ) ) goto Exit; for ( i = 0; i < vstore->dataCount; i++ ) @@ -1234,7 +1236,7 @@ if ( FT_READ_USHORT( data->regionIdxCount ) ) goto Exit; - if ( FT_QNEW_ARRAY( data->regionIndices, data->regionIdxCount ) ) + if ( FT_NEW_ARRAY( data->regionIndices, data->regionIdxCount ) ) goto Exit; for ( j = 0; j < data->regionIdxCount; j++ ) @@ -1320,9 +1322,9 @@ /* increase or allocate `blend_stack' and reset `blend_top'; */ /* prepare to append `numBlends' values to the buffer */ - if ( FT_QREALLOC( subFont->blend_stack, - subFont->blend_alloc, - subFont->blend_alloc + size ) ) + if ( FT_REALLOC( subFont->blend_stack, + subFont->blend_alloc, + subFont->blend_alloc + size ) ) goto Exit; subFont->blend_top = subFont->blend_stack + subFont->blend_used; @@ -1435,7 +1437,9 @@ /* prepare buffer for the blend vector */ len = varData->regionIdxCount + 1; /* add 1 for default component */ - if ( FT_QRENEW_ARRAY( blend->BV, blend->lenBV, len ) ) + if ( FT_REALLOC( blend->BV, + blend->lenBV * sizeof( *blend->BV ), + len * sizeof( *blend->BV ) ) ) goto Exit; blend->lenBV = len; @@ -1452,8 +1456,10 @@ if ( master == 0 ) { blend->BV[master] = FT_FIXED_ONE; - FT_TRACE4(( " build blend vector len %d\n", len )); - FT_TRACE4(( " [ %f ", blend->BV[master] / 65536.0 )); + FT_TRACE4(( " build blend vector len %d\n" + " [ %f ", + len, + blend->BV[master] / 65536.0 )); continue; } @@ -1537,7 +1543,9 @@ if ( lenNDV != 0 ) { /* user has set a normalized vector */ - if ( FT_QRENEW_ARRAY( blend->lastNDV, blend->lenNDV, lenNDV ) ) + if ( FT_REALLOC( blend->lastNDV, + blend->lenNDV * sizeof ( *NDV ), + lenNDV * sizeof ( *NDV ) ) ) goto Exit; FT_MEM_COPY( blend->lastNDV, @@ -2355,8 +2363,8 @@ if ( font->name_index.count > 1 ) { FT_ERROR(( "cff_font_load:" - " invalid CFF font with multiple subfonts\n" )); - FT_ERROR(( " " + " invalid CFF font with multiple subfonts\n" + " " " in SFNT wrapper\n" )); error = FT_THROW( Invalid_File_Format ); goto Exit; diff --git a/Build/source/libs/freetype2/freetype-src/src/cff/cffload.h b/Build/source/libs/freetype2/freetype-src/src/cff/cffload.h index 20f9296c4fb..fc998db2db9 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffload.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffload.h @@ -4,7 +4,7 @@ * * OpenType & CFF data/program tables loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cffobjs.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffobjs.c index c50281342de..d555d523580 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffobjs.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffobjs.c @@ -4,7 +4,7 @@ * * OpenType objects manager (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -659,8 +659,8 @@ if ( dict->cid_registry == 0xFFFFU && !psnames ) { FT_ERROR(( "cff_face_init:" - " cannot open CFF & CEF fonts\n" )); - FT_ERROR(( " " + " cannot open CFF & CEF fonts\n" + " " " without the `psnames' module\n" )); error = FT_THROW( Missing_Module ); goto Exit; @@ -1174,7 +1174,11 @@ /* set default property values, cf. `ftcffdrv.h' */ +#ifdef CFF_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/cff/cffobjs.h b/Build/source/libs/freetype2/freetype-src/src/cff/cffobjs.h index 149a8a2f0a7..845bd909413 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffobjs.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffobjs.h @@ -4,7 +4,7 @@ * * OpenType objects manager (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cffparse.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.c index dde55e95c24..69bcd5d957c 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.c @@ -4,7 +4,7 @@ * * CFF token stream parser (body) * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -62,7 +62,7 @@ parser->num_axes = num_axes; /* allocate the stack buffer */ - if ( FT_QNEW_ARRAY( parser->stack, stackSize ) ) + if ( FT_NEW_ARRAY( parser->stack, stackSize ) ) { FT_FREE( parser->stack ); goto Exit; @@ -713,10 +713,9 @@ ( max_scaling - min_scaling ) > 9 ) { FT_TRACE1(( "cff_parse_font_matrix:" - " strange scaling values (minimum %ld, maximum %ld),\n", - min_scaling, max_scaling )); - FT_TRACE1(( " " - " using default matrix\n" )); + " strange scaling values (minimum %ld, maximum %ld),\n" + " " + " using default matrix\n", min_scaling, max_scaling )); goto Unlikely; } @@ -1516,7 +1515,6 @@ case cff_kind_fixed_thousand: FT_TRACE4(( " %f\n", (double)val / 65536 / 1000 )); - break; default: ; /* never reached */ diff --git a/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.h b/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.h index a28ab52200a..6f3fbb37d63 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffparse.h @@ -4,7 +4,7 @@ * * CFF token stream parser (specification) * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/cfftoken.h b/Build/source/libs/freetype2/freetype-src/src/cff/cfftoken.h index eef30690c43..4c6a53eec13 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cfftoken.h +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cfftoken.h @@ -4,7 +4,7 @@ * * CFF token definitions (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2020 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/cff/module.mk b/Build/source/libs/freetype2/freetype-src/src/cff/module.mk index cfa444d8f3a..bd728c6a348 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/module.mk +++ b/Build/source/libs/freetype2/freetype-src/src/cff/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2021 by +# Copyright (C) 1996-2020 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/cff/rules.mk b/Build/source/libs/freetype2/freetype-src/src/cff/rules.mk index e54614ffe56..70bb92d5063 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/rules.mk +++ b/Build/source/libs/freetype2/freetype-src/src/cff/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2021 by +# Copyright (C) 1996-2020 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, |