summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/src/cid
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
commit0de5be92a3a0fe27e8521fc4de67e19b1057842e (patch)
treee93a390fe965486cca19498840cb8d7904252fec /Build/source/libs/freetype2/freetype-src/src/cid
parent27ce96eea3f1190bd744448cfa149e8d767af95a (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/cid')
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/ciderrs.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidgload.c19
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidgload.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidload.c36
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidload.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.c6
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidparse.c2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidparse.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidriver.c2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidriver.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/cidtoken.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/module.mk2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/rules.mk2
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/cid/type1cid.c2
15 files changed, 44 insertions, 41 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 2d762d9e1d1..f698bb22936 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-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/cid/cidgload.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidgload.c
index bd0a7e7fb10..54aa62f8104 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-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,
@@ -85,10 +85,10 @@
if ( glyph_data.length != 0 )
{
glyph_length = (FT_ULong)( glyph_data.length - cid->fd_bytes );
-
- if ( !FT_QALLOC( charstring, glyph_length ) )
- FT_MEM_COPY( charstring, glyph_data.pointer + cid->fd_bytes,
- glyph_length );
+ (void)FT_ALLOC( charstring, glyph_length );
+ if ( !error )
+ ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes,
+ glyph_length );
}
inc->funcs->free_glyph_data( inc->object, &glyph_data );
@@ -130,10 +130,11 @@
}
glyph_length = off2 - off1;
-
- if ( glyph_length == 0 ||
- FT_QALLOC( charstring, glyph_length ) ||
- FT_STREAM_READ_AT( cid->data_offset + off1,
+ if ( glyph_length == 0 )
+ goto Exit;
+ if ( FT_ALLOC( charstring, glyph_length ) )
+ goto Exit;
+ if ( 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 8b515efa01c..da36e37e069 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-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/cid/cidload.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidload.c
index 7fd0d7c78c2..bb9136a3df8 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-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,
@@ -552,7 +552,7 @@
goto Fail;
}
- if ( FT_QRENEW_ARRAY( offsets, max_offsets, new_max ) )
+ if ( FT_RENEW_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_QNEW_ARRAY( subr->code, num_subrs + 1 ) ||
- FT_QALLOC( subr->code[0], data_len ) )
+ if ( FT_NEW_ARRAY( subr->code, num_subrs + 1 ) ||
+ FT_ALLOC( subr->code[0], data_len ) )
goto Fail;
if ( FT_STREAM_SEEK( cid->data_offset + offsets[0] ) ||
@@ -665,18 +665,17 @@
static FT_Error
- cid_hex_to_binary( FT_Byte* data,
- FT_ULong data_len,
- FT_ULong offset,
- CID_Face face,
- FT_ULong* data_written )
+ cid_hex_to_binary( FT_Byte* data,
+ FT_ULong data_len,
+ FT_ULong offset,
+ CID_Face face )
{
FT_Stream stream = face->root.stream;
FT_Error error;
FT_Byte buffer[256];
FT_Byte *p, *plimit;
- FT_Byte *d = data, *dlimit;
+ FT_Byte *d, *dlimit;
FT_Byte val;
FT_Bool upper_nibble, done;
@@ -685,6 +684,7 @@
if ( FT_STREAM_SEEK( offset ) )
goto Exit;
+ d = data;
dlimit = d + data_len;
p = buffer;
plimit = p;
@@ -758,7 +758,6 @@
error = FT_Err_Ok;
Exit:
- *data_written = (FT_ULong)( d - data );
return error;
}
@@ -804,8 +803,8 @@
if ( parser->binary_length >
face->root.stream->size - parser->data_offset )
{
- FT_TRACE0(( "cid_face_open: adjusting length of binary data\n" ));
- FT_TRACE0(( " (from %ld to %ld bytes)\n",
+ FT_TRACE0(( "cid_face_open: adjusting length of binary data\n"
+ " (from %ld to %ld bytes)\n",
parser->binary_length,
face->root.stream->size - parser->data_offset ));
parser->binary_length = face->root.stream->size -
@@ -813,16 +812,15 @@
}
/* we must convert the data section from hexadecimal to binary */
- if ( FT_QALLOC( face->binary_data, parser->binary_length ) ||
+ if ( FT_ALLOC( face->binary_data, parser->binary_length ) ||
FT_SET_ERROR( cid_hex_to_binary( face->binary_data,
parser->binary_length,
parser->data_offset,
- face,
- &binary_length ) ) )
+ face ) ) )
goto Exit;
FT_Stream_OpenMemory( face->cid_stream,
- face->binary_data, binary_length );
+ face->binary_data, parser->binary_length );
cid->data_offset = 0;
}
else
@@ -845,8 +843,8 @@
if ( cid->fd_bytes > 4 || cid->gd_bytes > 4 )
{
FT_ERROR(( "cid_face_open:"
- " Values of `FDBytes' or `GDBytes' larger than 4\n" ));
- FT_ERROR(( " "
+ " Values of `FDBytes' or `GDBytes' larger than 4\n"
+ " "
" 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 456685c2af1..06fb9ef4767 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-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/cid/cidobjs.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidobjs.c
index c7568118547..04b295eb8f3 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-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,
@@ -479,7 +479,11 @@
/* 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 32f59cbcceb..6ae3061379c 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-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/cid/cidparse.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.c
index a28f8ee5590..1fc098b448e 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-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/cid/cidparse.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidparse.h
index 6a00c6cee12..0b49bebf488 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-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/cid/cidriver.c b/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.c
index a0898dfa2fd..d08cea1d7e8 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-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/cid/cidriver.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidriver.h
index 3ff5f78e11a..0fc8ed37bf2 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-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/cid/cidtoken.h b/Build/source/libs/freetype2/freetype-src/src/cid/cidtoken.h
index 84c8258014d..e9f068bb501 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-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/cid/module.mk b/Build/source/libs/freetype2/freetype-src/src/cid/module.mk
index 2e16262b3a2..9fb02235e6f 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-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/cid/rules.mk b/Build/source/libs/freetype2/freetype-src/src/cid/rules.mk
index 933b2daf783..94f663c80e3 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-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/cid/type1cid.c b/Build/source/libs/freetype2/freetype-src/src/cid/type1cid.c
index 5405ecffc8f..082e8bfe5b3 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-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,