summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/cid
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/cid')
-rw-r--r--src/3rdparty/freetype/src/cid/Jamfile2
-rw-r--r--src/3rdparty/freetype/src/cid/ciderrs.h46
-rw-r--r--src/3rdparty/freetype/src/cid/cidgload.c49
-rw-r--r--src/3rdparty/freetype/src/cid/cidgload.h32
-rw-r--r--src/3rdparty/freetype/src/cid/cidload.c185
-rw-r--r--src/3rdparty/freetype/src/cid/cidload.h32
-rw-r--r--src/3rdparty/freetype/src/cid/cidobjs.c204
-rw-r--r--src/3rdparty/freetype/src/cid/cidobjs.h116
-rw-r--r--src/3rdparty/freetype/src/cid/cidparse.c46
-rw-r--r--src/3rdparty/freetype/src/cid/cidparse.h108
-rw-r--r--src/3rdparty/freetype/src/cid/cidriver.c56
-rw-r--r--src/3rdparty/freetype/src/cid/cidriver.h38
-rw-r--r--src/3rdparty/freetype/src/cid/cidtoken.h57
-rw-r--r--src/3rdparty/freetype/src/cid/module.mk2
-rw-r--r--src/3rdparty/freetype/src/cid/rules.mk2
-rw-r--r--src/3rdparty/freetype/src/cid/type1cid.c32
16 files changed, 557 insertions, 450 deletions
diff --git a/src/3rdparty/freetype/src/cid/Jamfile b/src/3rdparty/freetype/src/cid/Jamfile
index 1c232fda3f..1cfb702574 100644
--- a/src/3rdparty/freetype/src/cid/Jamfile
+++ b/src/3rdparty/freetype/src/cid/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/cid Jamfile
#
-# Copyright 2001-2018 by
+# Copyright (C) 2001-2019 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/3rdparty/freetype/src/cid/ciderrs.h b/src/3rdparty/freetype/src/cid/ciderrs.h
index a5a86e3fc6..be80bed3be 100644
--- a/src/3rdparty/freetype/src/cid/ciderrs.h
+++ b/src/3rdparty/freetype/src/cid/ciderrs.h
@@ -1,26 +1,26 @@
-/***************************************************************************/
-/* */
-/* ciderrs.h */
-/* */
-/* CID error codes (specification only). */
-/* */
-/* Copyright 2001-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* This file is used to define the CID error enumeration constants. */
- /* */
- /*************************************************************************/
+/****************************************************************************
+ *
+ * ciderrs.h
+ *
+ * CID error codes (specification only).
+ *
+ * Copyright (C) 2001-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * This file is used to define the CID error enumeration constants.
+ *
+ */
#ifndef CIDERRS_H_
#define CIDERRS_H_
diff --git a/src/3rdparty/freetype/src/cid/cidgload.c b/src/3rdparty/freetype/src/cid/cidgload.c
index d14f9a2cc9..f59f2880f0 100644
--- a/src/3rdparty/freetype/src/cid/cidgload.c
+++ b/src/3rdparty/freetype/src/cid/cidgload.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidgload.c */
-/* */
-/* CID-keyed Type1 Glyph Loader (body). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidgload.c
+ *
+ * CID-keyed Type1 Glyph Loader (body).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 <ft2build.h>
@@ -31,14 +31,14 @@
#include "ciderrs.h"
- /*************************************************************************/
- /* */
- /* 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. */
- /* */
+ /**************************************************************************
+ *
+ * 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 trace_cidgload
+#define FT_COMPONENT cidgload
FT_CALLBACK_DEF( FT_Error )
@@ -393,8 +393,7 @@
must_finish_decoder = TRUE;
/* set up the decoder */
- decoder.builder.no_recurse = FT_BOOL(
- ( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 ) );
+ decoder.builder.no_recurse = FT_BOOL( load_flags & FT_LOAD_NO_RECURSE );
error = cid_load_glyph( &decoder, glyph_index );
if ( error )
diff --git a/src/3rdparty/freetype/src/cid/cidgload.h b/src/3rdparty/freetype/src/cid/cidgload.h
index 4811852ae4..37eba7ca7b 100644
--- a/src/3rdparty/freetype/src/cid/cidgload.h
+++ b/src/3rdparty/freetype/src/cid/cidgload.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidgload.h */
-/* */
-/* OpenType Glyph Loader (specification). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidgload.h
+ *
+ * OpenType Glyph Loader (specification).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 CIDGLOAD_H_
diff --git a/src/3rdparty/freetype/src/cid/cidload.c b/src/3rdparty/freetype/src/cid/cidload.c
index 27cd09b3c3..fce3e37da7 100644
--- a/src/3rdparty/freetype/src/cid/cidload.c
+++ b/src/3rdparty/freetype/src/cid/cidload.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidload.c */
-/* */
-/* CID-keyed Type1 font loader (body). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidload.c
+ *
+ * CID-keyed Type1 font loader (body).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 <ft2build.h>
@@ -21,20 +21,21 @@
#include FT_CONFIG_CONFIG_H
#include FT_MULTIPLE_MASTERS_H
#include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include "cidload.h"
#include "ciderrs.h"
- /*************************************************************************/
- /* */
- /* 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. */
- /* */
+ /**************************************************************************
+ *
+ * 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 trace_cidload
+#define FT_COMPONENT cidload
/* read a single offset */
@@ -81,6 +82,8 @@
/* if the keyword has a dedicated callback, call it */
if ( keyword->type == T1_FIELD_TYPE_CALLBACK )
{
+ FT_TRACE4(( " %s", keyword->ident ));
+
keyword->reader( (FT_Face)face, parser );
error = parser->root.error;
goto Exit;
@@ -131,6 +134,8 @@
}
}
+ FT_TRACE4(( " %s", keyword->ident ));
+
dummy_object = object;
/* now, load the keyword data in the object's field(s) */
@@ -141,12 +146,15 @@
else
error = cid_parser_load_field( &loader->parser,
keyword, &dummy_object );
+
+ FT_TRACE4(( "\n" ));
+
Exit:
return error;
}
- FT_CALLBACK_DEF( FT_Error )
+ FT_CALLBACK_DEF( void )
cid_parse_font_matrix( CID_Face face,
CID_Parser* parser )
{
@@ -171,14 +179,25 @@
result = cid_parser_to_fixed_array( parser, 6, temp, 3 );
if ( result < 6 )
- return FT_THROW( Invalid_File_Format );
+ {
+ FT_ERROR(( "cid_parse_font_matrix: not enough matrix elements\n" ));
+ goto Exit;
+ }
+
+ FT_TRACE4(( " [%f %f %f %f %f %f]\n",
+ (double)temp[0] / 65536 / 1000,
+ (double)temp[1] / 65536 / 1000,
+ (double)temp[2] / 65536 / 1000,
+ (double)temp[3] / 65536 / 1000,
+ (double)temp[4] / 65536 / 1000,
+ (double)temp[5] / 65536 / 1000 ));
temp_scale = FT_ABS( temp[3] );
if ( temp_scale == 0 )
{
FT_ERROR(( "cid_parse_font_matrix: invalid font matrix\n" ));
- return FT_THROW( Invalid_File_Format );
+ goto Exit;
}
/* atypical case */
@@ -200,16 +219,24 @@
matrix->xy = temp[2];
matrix->yy = temp[3];
+ if ( !FT_Matrix_Check( matrix ) )
+ {
+ FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" ));
+ parser->root.error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
/* note that the font offsets are expressed in integer font units */
offset->x = temp[4] >> 16;
offset->y = temp[5] >> 16;
}
- return FT_Err_Ok;
+ Exit:
+ return;
}
- FT_CALLBACK_DEF( FT_Error )
+ FT_CALLBACK_DEF( void )
parse_fd_array( CID_Face face,
CID_Parser* parser )
{
@@ -224,10 +251,11 @@
if ( num_dicts < 0 )
{
FT_ERROR(( "parse_fd_array: invalid number of dictionaries\n" ));
- error = FT_THROW( Invalid_File_Format );
goto Exit;
}
+ FT_TRACE4(( " %d\n", num_dicts ));
+
/*
* A single entry in the FDArray must (at least) contain the following
* structure elements.
@@ -263,27 +291,31 @@
cid->num_dicts = num_dicts;
- /* don't forget to set a few defaults */
+ /* set some default values (the same as for Type 1 fonts) */
for ( n = 0; n < cid->num_dicts; n++ )
{
CID_FaceDict dict = cid->font_dicts + n;
- /* default value for lenIV */
- dict->private_dict.lenIV = 4;
+ dict->private_dict.blue_shift = 7;
+ dict->private_dict.blue_fuzz = 1;
+ dict->private_dict.lenIV = 4;
+ dict->private_dict.expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );
+ dict->private_dict.blue_scale = (FT_Fixed)(
+ 0.039625 * 0x10000L * 1000 );
}
}
Exit:
- return error;
+ return;
}
- /* by mistake, `expansion_factor' appears both in PS_PrivateRec */
+ /* By mistake, `expansion_factor' appears both in PS_PrivateRec */
/* and CID_FaceDictRec (both are public header files and can't */
- /* changed); we simply copy the value */
+ /* changed). We simply copy the value. */
- FT_CALLBACK_DEF( FT_Error )
+ FT_CALLBACK_DEF( void )
parse_expansion_factor( CID_Face face,
CID_Parser* parser )
{
@@ -296,9 +328,43 @@
dict->expansion_factor = cid_parser_to_fixed( parser, 0 );
dict->private_dict.expansion_factor = dict->expansion_factor;
+
+ FT_TRACE4(( "%d\n", dict->expansion_factor ));
+ }
+
+ return;
+ }
+
+
+ /* By mistake, `CID_FaceDictRec' doesn't contain a field for the */
+ /* `FontName' keyword. FreeType doesn't need it, but it is nice */
+ /* to catch it for producing better trace output. */
+
+ FT_CALLBACK_DEF( void )
+ parse_font_name( CID_Face face,
+ CID_Parser* parser )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( parser->num_dict >= 0 && parser->num_dict < face->cid.num_dicts )
+ {
+ T1_TokenRec token;
+ FT_UInt len;
+
+
+ cid_parser_to_token( parser, &token );
+
+ len = (FT_UInt)( token.limit - token.start );
+ if ( len )
+ FT_TRACE4(( " %.*s\n", len, token.start ));
+ else
+ FT_TRACE4(( " <no value>\n" ));
}
+#else
+ FT_UNUSED( face );
+ FT_UNUSED( parser );
+#endif
- return FT_Err_Ok;
+ return;
}
@@ -311,6 +377,7 @@
T1_FIELD_CALLBACK( "FDArray", parse_fd_array, 0 )
T1_FIELD_CALLBACK( "FontMatrix", cid_parse_font_matrix, 0 )
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 }
};
@@ -356,7 +423,16 @@
/* if /FDArray was found, then cid->num_dicts is > 0, and */
/* we can start increasing parser->num_dict */
if ( face->cid.num_dicts > 0 )
+ {
parser->num_dict++;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " FontDict %d", parser->num_dict ));
+ if ( parser->num_dict > face->cid.num_dicts )
+ FT_TRACE4(( " (ignored)" ));
+ FT_TRACE4(( "\n" ));
+#endif
+ }
}
}
@@ -757,7 +833,7 @@
if ( cid->fd_bytes < 0 || cid->gd_bytes < 1 )
{
- FT_ERROR(( "cid_parse_dict:"
+ FT_ERROR(( "cid_face_open:"
" Invalid `FDBytes' or `GDBytes' value\n" ));
error = FT_THROW( Invalid_File_Format );
goto Exit;
@@ -766,7 +842,7 @@
/* allow at most 32bit offsets */
if ( cid->fd_bytes > 4 || cid->gd_bytes > 4 )
{
- FT_ERROR(( "cid_parse_dict:"
+ FT_ERROR(( "cid_face_open:"
" Values of `FDBytes' or `GDBytes' larger than 4\n"
" "
" are not supported\n" ));
@@ -782,17 +858,36 @@
CID_FaceDict dict = cid->font_dicts + n;
+ /* the upper limits are ad-hoc values */
+ if ( dict->private_dict.blue_shift > 1000 ||
+ dict->private_dict.blue_shift < 0 )
+ {
+ FT_TRACE2(( "cid_face_open:"
+ " setting unlikely BlueShift value %d to default (7)\n",
+ dict->private_dict.blue_shift ));
+ dict->private_dict.blue_shift = 7;
+ }
+
+ if ( dict->private_dict.blue_fuzz > 1000 ||
+ dict->private_dict.blue_fuzz < 0 )
+ {
+ FT_TRACE2(( "cid_face_open:"
+ " setting unlikely BlueFuzz value %d to default (1)\n",
+ dict->private_dict.blue_fuzz ));
+ dict->private_dict.blue_fuzz = 1;
+ }
+
if ( dict->sd_bytes < 0 ||
( dict->num_subrs && dict->sd_bytes < 1 ) )
{
- FT_ERROR(( "cid_parse_dict: Invalid `SDBytes' value\n" ));
+ FT_ERROR(( "cid_face_open: Invalid `SDBytes' value\n" ));
error = FT_THROW( Invalid_File_Format );
goto Exit;
}
if ( dict->sd_bytes > 4 )
{
- FT_ERROR(( "cid_parse_dict:"
+ FT_ERROR(( "cid_face_open:"
" Values of `SDBytes' larger than 4"
" are not supported\n" ));
error = FT_THROW( Invalid_File_Format );
@@ -801,7 +896,7 @@
if ( dict->subrmap_offset > binary_length )
{
- FT_ERROR(( "cid_parse_dict: Invalid `SubrMapOffset' value\n" ));
+ FT_ERROR(( "cid_face_open: Invalid `SubrMapOffset' value\n" ));
error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -812,7 +907,7 @@
dict->num_subrs > ( binary_length - dict->subrmap_offset ) /
(FT_UInt)dict->sd_bytes ) )
{
- FT_ERROR(( "cid_parse_dict: Invalid `SubrCount' value\n" ));
+ FT_ERROR(( "cid_face_open: Invalid `SubrCount' value\n" ));
error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -820,7 +915,7 @@
if ( cid->cidmap_offset > binary_length )
{
- FT_ERROR(( "cid_parse_dict: Invalid `CIDMapOffset' value\n" ));
+ FT_ERROR(( "cid_face_open: Invalid `CIDMapOffset' value\n" ));
error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -829,7 +924,7 @@
cid->cid_count >
( binary_length - cid->cidmap_offset ) / entry_len )
{
- FT_ERROR(( "cid_parse_dict: Invalid `CIDCount' value\n" ));
+ FT_ERROR(( "cid_face_open: Invalid `CIDCount' value\n" ));
error = FT_THROW( Invalid_File_Format );
goto Exit;
}
diff --git a/src/3rdparty/freetype/src/cid/cidload.h b/src/3rdparty/freetype/src/cid/cidload.h
index 3f8bd08620..fb9d46216d 100644
--- a/src/3rdparty/freetype/src/cid/cidload.h
+++ b/src/3rdparty/freetype/src/cid/cidload.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidload.h */
-/* */
-/* CID-keyed Type1 font loader (specification). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidload.h
+ *
+ * CID-keyed Type1 font loader (specification).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 CIDLOAD_H_
diff --git a/src/3rdparty/freetype/src/cid/cidobjs.c b/src/3rdparty/freetype/src/cid/cidobjs.c
index 77afe1c875..4e9728719b 100644
--- a/src/3rdparty/freetype/src/cid/cidobjs.c
+++ b/src/3rdparty/freetype/src/cid/cidobjs.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidobjs.c */
-/* */
-/* CID objects manager (body). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidobjs.c
+ *
+ * CID objects manager (body).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 <ft2build.h>
@@ -31,21 +31,21 @@
#include "ciderrs.h"
- /*************************************************************************/
- /* */
- /* 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. */
- /* */
+ /**************************************************************************
+ *
+ * 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 trace_cidobjs
+#define FT_COMPONENT cidobjs
- /*************************************************************************/
- /* */
- /* SLOT FUNCTIONS */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * SLOT FUNCTIONS
+ *
+ */
FT_LOCAL_DEF( void )
cid_slot_done( FT_GlyphSlot slot )
@@ -85,11 +85,11 @@
}
- /*************************************************************************/
- /* */
- /* SIZE FUNCTIONS */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * SIZE FUNCTIONS
+ *
+ */
static PSH_Globals_Funcs
@@ -174,23 +174,24 @@
}
- /*************************************************************************/
- /* */
- /* FACE FUNCTIONS */
- /* */
- /*************************************************************************/
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cid_face_done */
- /* */
- /* <Description> */
- /* Finalizes a given face object. */
- /* */
- /* <Input> */
- /* face :: A pointer to the face object to destroy. */
- /* */
+ /**************************************************************************
+ *
+ * FACE FUNCTIONS
+ *
+ */
+
+ /**************************************************************************
+ *
+ * @Function:
+ * cid_face_done
+ *
+ * @Description:
+ * Finalizes a given face object.
+ *
+ * @Input:
+ * face ::
+ * A pointer to the face object to destroy.
+ */
FT_LOCAL_DEF( void )
cid_face_done( FT_Face cidface ) /* CID_Face */
{
@@ -252,29 +253,34 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cid_face_init */
- /* */
- /* <Description> */
- /* Initializes a given CID face object. */
- /* */
- /* <Input> */
- /* stream :: The source font stream. */
- /* */
- /* face_index :: The index of the font face in the resource. */
- /* */
- /* num_params :: Number of additional generic parameters. Ignored. */
- /* */
- /* params :: Additional generic parameters. Ignored. */
- /* */
- /* <InOut> */
- /* face :: The newly built face object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * cid_face_init
+ *
+ * @Description:
+ * Initializes a given CID face object.
+ *
+ * @Input:
+ * stream ::
+ * The source font stream.
+ *
+ * face_index ::
+ * The index of the font face in the resource.
+ *
+ * num_params ::
+ * Number of additional generic parameters. Ignored.
+ *
+ * params ::
+ * Additional generic parameters. Ignored.
+ *
+ * @InOut:
+ * face ::
+ * The newly built face object.
+ *
+ * @Return:
+ * FreeType error code. 0 means success.
+ */
FT_LOCAL_DEF( FT_Error )
cid_face_init( FT_Stream stream,
FT_Face cidface, /* CID_Face */
@@ -449,20 +455,21 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cid_driver_init */
- /* */
- /* <Description> */
- /* Initializes a given CID driver object. */
- /* */
- /* <Input> */
- /* driver :: A handle to the target driver object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * cid_driver_init
+ *
+ * @Description:
+ * Initializes a given CID driver object.
+ *
+ * @Input:
+ * driver ::
+ * A handle to the target driver object.
+ *
+ * @Return:
+ * FreeType error code. 0 means success.
+ */
FT_LOCAL_DEF( FT_Error )
cid_driver_init( FT_Module module )
{
@@ -505,17 +512,18 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cid_driver_done */
- /* */
- /* <Description> */
- /* Finalizes a given CID driver. */
- /* */
- /* <Input> */
- /* driver :: A handle to the target CID driver. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * cid_driver_done
+ *
+ * @Description:
+ * Finalizes a given CID driver.
+ *
+ * @Input:
+ * driver ::
+ * A handle to the target CID driver.
+ */
FT_LOCAL_DEF( void )
cid_driver_done( FT_Module driver )
{
diff --git a/src/3rdparty/freetype/src/cid/cidobjs.h b/src/3rdparty/freetype/src/cid/cidobjs.h
index 0221f017dd..89c9aa74ab 100644
--- a/src/3rdparty/freetype/src/cid/cidobjs.h
+++ b/src/3rdparty/freetype/src/cid/cidobjs.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidobjs.h */
-/* */
-/* CID objects manager (specification). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidobjs.h
+ *
+ * CID objects manager (specification).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 CIDOBJS_H_
@@ -34,60 +34,60 @@ FT_BEGIN_HEADER
typedef struct CID_Glyph_Hints_ CID_Glyph_Hints;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CID_Driver */
- /* */
- /* <Description> */
- /* A handle to a Type 1 driver object. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * CID_Driver
+ *
+ * @Description:
+ * A handle to a Type 1 driver object.
+ */
typedef struct CID_DriverRec_* CID_Driver;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CID_Size */
- /* */
- /* <Description> */
- /* A handle to a Type 1 size object. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * CID_Size
+ *
+ * @Description:
+ * A handle to a Type 1 size object.
+ */
typedef struct CID_SizeRec_* CID_Size;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CID_GlyphSlot */
- /* */
- /* <Description> */
- /* A handle to a Type 1 glyph slot object. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * CID_GlyphSlot
+ *
+ * @Description:
+ * A handle to a Type 1 glyph slot object.
+ */
typedef struct CID_GlyphSlotRec_* CID_GlyphSlot;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CID_CharMap */
- /* */
- /* <Description> */
- /* A handle to a Type 1 character mapping object. */
- /* */
- /* <Note> */
- /* The Type 1 format doesn't use a charmap but an encoding table. */
- /* The driver is responsible for making up charmap objects */
- /* corresponding to these tables. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * CID_CharMap
+ *
+ * @Description:
+ * A handle to a Type 1 character mapping object.
+ *
+ * @Note:
+ * The Type 1 format doesn't use a charmap but an encoding table.
+ * The driver is responsible for making up charmap objects
+ * corresponding to these tables.
+ */
typedef struct CID_CharMapRec_* CID_CharMap;
- /*************************************************************************/
- /* */
- /* HERE BEGINS THE TYPE 1 SPECIFIC STUFF */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * HERE BEGINS THE TYPE 1 SPECIFIC STUFF
+ *
+ */
typedef struct CID_SizeRec_
diff --git a/src/3rdparty/freetype/src/cid/cidparse.c b/src/3rdparty/freetype/src/cid/cidparse.c
index b1c7f3cb2c..1be46ec328 100644
--- a/src/3rdparty/freetype/src/cid/cidparse.c
+++ b/src/3rdparty/freetype/src/cid/cidparse.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidparse.c */
-/* */
-/* CID-keyed Type1 parser (body). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidparse.c
+ *
+ * CID-keyed Type1 parser (body).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 <ft2build.h>
@@ -26,14 +26,14 @@
#include "ciderrs.h"
- /*************************************************************************/
- /* */
- /* 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. */
- /* */
+ /**************************************************************************
+ *
+ * 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 trace_cidparse
+#define FT_COMPONENT cidparse
/*************************************************************************/
diff --git a/src/3rdparty/freetype/src/cid/cidparse.h b/src/3rdparty/freetype/src/cid/cidparse.h
index 61602f7674..ec1f6a346d 100644
--- a/src/3rdparty/freetype/src/cid/cidparse.h
+++ b/src/3rdparty/freetype/src/cid/cidparse.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidparse.h */
-/* */
-/* CID-keyed Type1 parser (specification). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidparse.h
+ *
+ * CID-keyed Type1 parser (specification).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 CIDPARSE_H_
@@ -29,35 +29,43 @@
FT_BEGIN_HEADER
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* CID_Parser */
- /* */
- /* <Description> */
- /* A CID_Parser is an object used to parse a Type 1 fonts very */
- /* quickly. */
- /* */
- /* <Fields> */
- /* root :: The root PS_ParserRec fields. */
- /* */
- /* stream :: The current input stream. */
- /* */
- /* postscript :: A pointer to the data to be parsed. */
- /* */
- /* postscript_len :: The length of the data to be parsed. */
- /* */
- /* data_offset :: The start position of the binary data (i.e., the */
- /* end of the data to be parsed. */
- /* */
- /* binary_length :: The length of the data after the `StartData' */
- /* command if the data format is hexadecimal. */
- /* */
- /* cid :: A structure which holds the information about */
- /* the current font. */
- /* */
- /* num_dict :: The number of font dictionaries. */
- /* */
+ /**************************************************************************
+ *
+ * @Struct:
+ * CID_Parser
+ *
+ * @Description:
+ * A CID_Parser is an object used to parse a Type 1 fonts very
+ * quickly.
+ *
+ * @Fields:
+ * root ::
+ * The root PS_ParserRec fields.
+ *
+ * stream ::
+ * The current input stream.
+ *
+ * postscript ::
+ * A pointer to the data to be parsed.
+ *
+ * postscript_len ::
+ * The length of the data to be parsed.
+ *
+ * data_offset ::
+ * The start position of the binary data (i.e., the
+ * end of the data to be parsed.
+ *
+ * binary_length ::
+ * The length of the data after the `StartData'
+ * command if the data format is hexadecimal.
+ *
+ * cid ::
+ * A structure which holds the information about
+ * the current font.
+ *
+ * num_dict ::
+ * The number of font dictionaries.
+ */
typedef struct CID_Parser_
{
PS_ParserRec root;
@@ -86,11 +94,11 @@ FT_BEGIN_HEADER
cid_parser_done( CID_Parser* parser );
- /*************************************************************************/
- /* */
- /* PARSING ROUTINES */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * PARSING ROUTINES
+ *
+ */
#define cid_parser_skip_spaces( p ) \
(p)->root.funcs.skip_spaces( &(p)->root )
diff --git a/src/3rdparty/freetype/src/cid/cidriver.c b/src/3rdparty/freetype/src/cid/cidriver.c
index d9faf353ea..4d91e87529 100644
--- a/src/3rdparty/freetype/src/cid/cidriver.c
+++ b/src/3rdparty/freetype/src/cid/cidriver.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidriver.c */
-/* */
-/* CID driver interface (body). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidriver.c
+ *
+ * CID driver interface (body).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 <ft2build.h>
@@ -34,18 +34,18 @@
#include FT_INTERNAL_POSTSCRIPT_AUX_H
- /*************************************************************************/
- /* */
- /* 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. */
- /* */
+ /**************************************************************************
+ *
+ * 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 trace_ciddriver
+#define FT_COMPONENT ciddriver
/*
- * POSTSCRIPT NAME SERVICE
+ * POSTSCRIPT NAME SERVICE
*
*/
@@ -69,7 +69,7 @@
/*
- * POSTSCRIPT INFO SERVICE
+ * POSTSCRIPT INFO SERVICE
*
*/
@@ -105,7 +105,7 @@
/*
- * CID INFO SERVICE
+ * CID INFO SERVICE
*
*/
static FT_Error
@@ -173,7 +173,7 @@
/*
- * PROPERTY SERVICE
+ * PROPERTY SERVICE
*
*/
@@ -185,7 +185,7 @@
/*
- * SERVICE LIST
+ * SERVICE LIST
*
*/
diff --git a/src/3rdparty/freetype/src/cid/cidriver.h b/src/3rdparty/freetype/src/cid/cidriver.h
index 59d9ded901..3402fd7e99 100644
--- a/src/3rdparty/freetype/src/cid/cidriver.h
+++ b/src/3rdparty/freetype/src/cid/cidriver.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidriver.h */
-/* */
-/* High-level CID driver interface (specification). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidriver.h
+ *
+ * High-level CID driver interface (specification).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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 CIDRIVER_H_
@@ -26,15 +26,9 @@
FT_BEGIN_HEADER
-#ifdef FT_CONFIG_OPTION_PIC
-#error "this module does not support PIC yet"
-#endif
-
-
FT_CALLBACK_TABLE
const FT_Driver_ClassRec t1cid_driver_class;
-
FT_END_HEADER
#endif /* CIDRIVER_H_ */
diff --git a/src/3rdparty/freetype/src/cid/cidtoken.h b/src/3rdparty/freetype/src/cid/cidtoken.h
index b0e2dac6aa..f505c9e166 100644
--- a/src/3rdparty/freetype/src/cid/cidtoken.h
+++ b/src/3rdparty/freetype/src/cid/cidtoken.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* cidtoken.h */
-/* */
-/* CID token definitions (specification only). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * cidtoken.h
+ *
+ * CID token definitions (specification only).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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.
+ *
+ */
#undef FT_STRUCTURE
@@ -21,17 +21,20 @@
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_CID_INFO
- T1_FIELD_KEY ( "CIDFontName", cid_font_name, 0 )
- T1_FIELD_FIXED ( "CIDFontVersion", cid_version, 0 )
- T1_FIELD_NUM ( "CIDFontType", cid_font_type, 0 )
- T1_FIELD_STRING( "Registry", registry, 0 )
- T1_FIELD_STRING( "Ordering", ordering, 0 )
- T1_FIELD_NUM ( "Supplement", supplement, 0 )
- T1_FIELD_NUM ( "UIDBase", uid_base, 0 )
- T1_FIELD_NUM ( "CIDMapOffset", cidmap_offset, 0 )
- T1_FIELD_NUM ( "FDBytes", fd_bytes, 0 )
- T1_FIELD_NUM ( "GDBytes", gd_bytes, 0 )
- T1_FIELD_NUM ( "CIDCount", cid_count, 0 )
+ T1_FIELD_KEY ( "CIDFontName", cid_font_name, 0 )
+ T1_FIELD_FIXED ( "CIDFontVersion", cid_version, 0 )
+ T1_FIELD_NUM ( "CIDFontType", cid_font_type, 0 )
+ T1_FIELD_STRING ( "Registry", registry, 0 )
+ T1_FIELD_STRING ( "Ordering", ordering, 0 )
+ T1_FIELD_NUM ( "Supplement", supplement, 0 )
+ T1_FIELD_NUM ( "UIDBase", uid_base, 0 )
+
+ T1_FIELD_NUM_TABLE( "XUID", xuid, 16, 0 )
+
+ T1_FIELD_NUM ( "CIDMapOffset", cidmap_offset, 0 )
+ T1_FIELD_NUM ( "FDBytes", fd_bytes, 0 )
+ T1_FIELD_NUM ( "GDBytes", gd_bytes, 0 )
+ T1_FIELD_NUM ( "CIDCount", cid_count, 0 )
#undef FT_STRUCTURE
diff --git a/src/3rdparty/freetype/src/cid/module.mk b/src/3rdparty/freetype/src/cid/module.mk
index 9010e339a4..875c683c72 100644
--- a/src/3rdparty/freetype/src/cid/module.mk
+++ b/src/3rdparty/freetype/src/cid/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2018 by
+# Copyright (C) 1996-2019 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/3rdparty/freetype/src/cid/rules.mk b/src/3rdparty/freetype/src/cid/rules.mk
index 94333bda06..2b68dd48a0 100644
--- a/src/3rdparty/freetype/src/cid/rules.mk
+++ b/src/3rdparty/freetype/src/cid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2018 by
+# Copyright (C) 1996-2019 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/3rdparty/freetype/src/cid/type1cid.c b/src/3rdparty/freetype/src/cid/type1cid.c
index 61770e3f1e..d21801cec1 100644
--- a/src/3rdparty/freetype/src/cid/type1cid.c
+++ b/src/3rdparty/freetype/src/cid/type1cid.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* type1cid.c */
-/* */
-/* FreeType OpenType driver component (body only). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * type1cid.c
+ *
+ * FreeType OpenType driver component (body only).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * 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.
+ *
+ */
#define FT_MAKE_OPTION_SINGLE_OBJECT