summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/type1
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/type1')
-rw-r--r--src/3rdparty/freetype/src/type1/Jamfile2
-rw-r--r--src/3rdparty/freetype/src/type1/module.mk2
-rw-r--r--src/3rdparty/freetype/src/type1/rules.mk2
-rw-r--r--src/3rdparty/freetype/src/type1/t1afm.c46
-rw-r--r--src/3rdparty/freetype/src/type1/t1afm.h32
-rw-r--r--src/3rdparty/freetype/src/type1/t1driver.c217
-rw-r--r--src/3rdparty/freetype/src/type1/t1driver.h38
-rw-r--r--src/3rdparty/freetype/src/type1/t1errors.h46
-rw-r--r--src/3rdparty/freetype/src/type1/t1gload.c77
-rw-r--r--src/3rdparty/freetype/src/type1/t1gload.h32
-rw-r--r--src/3rdparty/freetype/src/type1/t1load.c451
-rw-r--r--src/3rdparty/freetype/src/type1/t1load.h42
-rw-r--r--src/3rdparty/freetype/src/type1/t1objs.c213
-rw-r--r--src/3rdparty/freetype/src/type1/t1objs.h132
-rw-r--r--src/3rdparty/freetype/src/type1/t1parse.c110
-rw-r--r--src/3rdparty/freetype/src/type1/t1parse.h101
-rw-r--r--src/3rdparty/freetype/src/type1/t1tokens.h32
-rw-r--r--src/3rdparty/freetype/src/type1/type1.c32
18 files changed, 930 insertions, 677 deletions
diff --git a/src/3rdparty/freetype/src/type1/Jamfile b/src/3rdparty/freetype/src/type1/Jamfile
index b94b7d0aae..0bcfb2e406 100644
--- a/src/3rdparty/freetype/src/type1/Jamfile
+++ b/src/3rdparty/freetype/src/type1/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/type1 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/type1/module.mk b/src/3rdparty/freetype/src/type1/module.mk
index 3fea5cc16f..2f48c65821 100644
--- a/src/3rdparty/freetype/src/type1/module.mk
+++ b/src/3rdparty/freetype/src/type1/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/type1/rules.mk b/src/3rdparty/freetype/src/type1/rules.mk
index cb1a142860..901169c7a5 100644
--- a/src/3rdparty/freetype/src/type1/rules.mk
+++ b/src/3rdparty/freetype/src/type1/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/type1/t1afm.c b/src/3rdparty/freetype/src/type1/t1afm.c
index 61053d9a64..6841184539 100644
--- a/src/3rdparty/freetype/src/type1/t1afm.c
+++ b/src/3rdparty/freetype/src/type1/t1afm.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1afm.c */
-/* */
-/* AFM support for Type 1 fonts (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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1afm.c
+ *
+ * AFM support for Type 1 fonts (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 @@
#ifndef T1_CONFIG_OPTION_NO_AFM
- /*************************************************************************/
- /* */
- /* 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_t1afm
+#define FT_COMPONENT t1afm
FT_LOCAL_DEF( void )
diff --git a/src/3rdparty/freetype/src/type1/t1afm.h b/src/3rdparty/freetype/src/type1/t1afm.h
index cb8d302b4d..a8e6a5495a 100644
--- a/src/3rdparty/freetype/src/type1/t1afm.h
+++ b/src/3rdparty/freetype/src/type1/t1afm.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1afm.h */
-/* */
-/* AFM support for Type 1 fonts (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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1afm.h
+ *
+ * AFM support for Type 1 fonts (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 T1AFM_H_
diff --git a/src/3rdparty/freetype/src/type1/t1driver.c b/src/3rdparty/freetype/src/type1/t1driver.c
index 029b410b47..557733da3b 100644
--- a/src/3rdparty/freetype/src/type1/t1driver.c
+++ b/src/3rdparty/freetype/src/type1/t1driver.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1driver.c */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1driver.c
+ *
+ * Type 1 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>
@@ -43,19 +43,19 @@
#include FT_SERVICE_KERNING_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_t1driver
+#define FT_COMPONENT t1driver
- /*
- * GLYPH DICT SERVICE
- *
- */
+ /*
+ * GLYPH DICT SERVICE
+ *
+ */
static FT_Error
t1_get_glyph_name( T1_Face face,
@@ -70,8 +70,8 @@
static FT_UInt
- t1_get_name_index( T1_Face face,
- FT_String* glyph_name )
+ t1_get_name_index( T1_Face face,
+ const FT_String* glyph_name )
{
FT_Int i;
@@ -97,7 +97,7 @@
/*
- * POSTSCRIPT NAME SERVICE
+ * POSTSCRIPT NAME SERVICE
*
*/
@@ -115,30 +115,32 @@
/*
- * MULTIPLE MASTERS SERVICE
+ * MULTIPLE MASTERS SERVICE
*
*/
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
static const FT_Service_MultiMastersRec t1_service_multi_masters =
{
- (FT_Get_MM_Func) T1_Get_Multi_Master, /* get_mm */
- (FT_Set_MM_Design_Func) T1_Set_MM_Design, /* set_mm_design */
- (FT_Set_MM_Blend_Func) T1_Set_MM_Blend, /* set_mm_blend */
- (FT_Get_MM_Blend_Func) T1_Get_MM_Blend, /* get_mm_blend */
- (FT_Get_MM_Var_Func) T1_Get_MM_Var, /* get_mm_var */
- (FT_Set_Var_Design_Func)T1_Set_Var_Design, /* set_var_design */
- (FT_Get_Var_Design_Func)T1_Get_Var_Design, /* get_var_design */
- (FT_Set_Instance_Func) T1_Reset_MM_Blend, /* set_instance */
-
- (FT_Get_Var_Blend_Func) NULL, /* get_var_blend */
- (FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
+ (FT_Get_MM_Func) T1_Get_Multi_Master, /* get_mm */
+ (FT_Set_MM_Design_Func) T1_Set_MM_Design, /* set_mm_design */
+ (FT_Set_MM_Blend_Func) T1_Set_MM_Blend, /* set_mm_blend */
+ (FT_Get_MM_Blend_Func) T1_Get_MM_Blend, /* get_mm_blend */
+ (FT_Get_MM_Var_Func) T1_Get_MM_Var, /* get_mm_var */
+ (FT_Set_Var_Design_Func) T1_Set_Var_Design, /* set_var_design */
+ (FT_Get_Var_Design_Func) T1_Get_Var_Design, /* get_var_design */
+ (FT_Set_Instance_Func) T1_Reset_MM_Blend, /* set_instance */
+ (FT_Set_MM_WeightVector_Func)T1_Set_MM_WeightVector, /* set_mm_weightvector */
+ (FT_Get_MM_WeightVector_Func)T1_Get_MM_WeightVector, /* get_mm_weightvector */
+
+ (FT_Get_Var_Blend_Func) NULL, /* get_var_blend */
+ (FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
};
#endif
/*
- * POSTSCRIPT INFO SERVICE
+ * POSTSCRIPT INFO SERVICE
*
*/
@@ -270,9 +272,12 @@
break;
case PS_DICT_FONT_NAME:
- retval = ft_strlen( type1->font_name ) + 1;
- if ( value && value_len >= retval )
- ft_memcpy( value, (void *)( type1->font_name ), retval );
+ if ( type1->font_name )
+ {
+ retval = ft_strlen( type1->font_name ) + 1;
+ if ( value && value_len >= retval )
+ ft_memcpy( value, (void *)( type1->font_name ), retval );
+ }
break;
case PS_DICT_UNIQUE_ID:
@@ -362,7 +367,7 @@
ok = 1;
}
- if ( ok )
+ if ( ok && type1->subrs )
{
retval = type1->subrs_len[idx] + 1;
if ( value && value_len >= retval )
@@ -559,33 +564,49 @@
break;
case PS_DICT_VERSION:
- retval = ft_strlen( type1->font_info.version ) + 1;
- if ( value && value_len >= retval )
- ft_memcpy( value, (void *)( type1->font_info.version ), retval );
+ if ( type1->font_info.version )
+ {
+ retval = ft_strlen( type1->font_info.version ) + 1;
+ if ( value && value_len >= retval )
+ ft_memcpy( value, (void *)( type1->font_info.version ), retval );
+ }
break;
case PS_DICT_NOTICE:
- retval = ft_strlen( type1->font_info.notice ) + 1;
- if ( value && value_len >= retval )
- ft_memcpy( value, (void *)( type1->font_info.notice ), retval );
+ if ( type1->font_info.notice )
+ {
+ retval = ft_strlen( type1->font_info.notice ) + 1;
+ if ( value && value_len >= retval )
+ ft_memcpy( value, (void *)( type1->font_info.notice ), retval );
+ }
break;
case PS_DICT_FULL_NAME:
- retval = ft_strlen( type1->font_info.full_name ) + 1;
- if ( value && value_len >= retval )
- ft_memcpy( value, (void *)( type1->font_info.full_name ), retval );
+ if ( type1->font_info.full_name )
+ {
+ retval = ft_strlen( type1->font_info.full_name ) + 1;
+ if ( value && value_len >= retval )
+ ft_memcpy( value, (void *)( type1->font_info.full_name ), retval );
+ }
break;
case PS_DICT_FAMILY_NAME:
- retval = ft_strlen( type1->font_info.family_name ) + 1;
- if ( value && value_len >= retval )
- ft_memcpy( value, (void *)( type1->font_info.family_name ), retval );
+ if ( type1->font_info.family_name )
+ {
+ retval = ft_strlen( type1->font_info.family_name ) + 1;
+ if ( value && value_len >= retval )
+ ft_memcpy( value, (void *)( type1->font_info.family_name ),
+ retval );
+ }
break;
case PS_DICT_WEIGHT:
- retval = ft_strlen( type1->font_info.weight ) + 1;
- if ( value && value_len >= retval )
- ft_memcpy( value, (void *)( type1->font_info.weight ), retval );
+ if ( type1->font_info.weight )
+ {
+ retval = ft_strlen( type1->font_info.weight ) + 1;
+ if ( value && value_len >= retval )
+ ft_memcpy( value, (void *)( type1->font_info.weight ), retval );
+ }
break;
case PS_DICT_ITALIC_ANGLE:
@@ -618,7 +639,7 @@
/*
- * PROPERTY SERVICE
+ * PROPERTY SERVICE
*
*/
@@ -630,7 +651,7 @@
/*
- * SERVICE LIST
+ * SERVICE LIST
*
*/
@@ -665,38 +686,42 @@
#ifndef T1_CONFIG_OPTION_NO_AFM
- /*************************************************************************/
- /* */
- /* <Function> */
- /* Get_Kerning */
- /* */
- /* <Description> */
- /* A driver method used to return the kerning vector between two */
- /* glyphs of the same face. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* */
- /* left_glyph :: The index of the left glyph in the kern pair. */
- /* */
- /* right_glyph :: The index of the right glyph in the kern pair. */
- /* */
- /* <Output> */
- /* kerning :: The kerning vector. This is in font units for */
- /* scalable formats, and in pixels for fixed-sizes */
- /* formats. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Only horizontal layouts (left-to-right & right-to-left) are */
- /* supported by this function. Other layouts, or more sophisticated */
- /* kernings are out of scope of this method (the basic driver */
- /* interface is meant to be simple). */
- /* */
- /* They can be implemented by format-specific interfaces. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * Get_Kerning
+ *
+ * @Description:
+ * A driver method used to return the kerning vector between two
+ * glyphs of the same face.
+ *
+ * @Input:
+ * face ::
+ * A handle to the source face object.
+ *
+ * left_glyph ::
+ * The index of the left glyph in the kern pair.
+ *
+ * right_glyph ::
+ * The index of the right glyph in the kern pair.
+ *
+ * @Output:
+ * kerning ::
+ * The kerning vector. This is in font units for
+ * scalable formats, and in pixels for fixed-sizes
+ * formats.
+ *
+ * @Return:
+ * FreeType error code. 0 means success.
+ *
+ * @Note:
+ * Only horizontal layouts (left-to-right & right-to-left) are
+ * supported by this function. Other layouts, or more sophisticated
+ * kernings are out of scope of this method (the basic driver
+ * interface is meant to be simple).
+ *
+ * They can be implemented by format-specific interfaces.
+ */
static FT_Error
Get_Kerning( FT_Face t1face, /* T1_Face */
FT_UInt left_glyph,
diff --git a/src/3rdparty/freetype/src/type1/t1driver.h b/src/3rdparty/freetype/src/type1/t1driver.h
index 2b1507233d..206f64a0bc 100644
--- a/src/3rdparty/freetype/src/type1/t1driver.h
+++ b/src/3rdparty/freetype/src/type1/t1driver.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1driver.h */
-/* */
-/* High-level Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1driver.h
+ *
+ * High-level Type 1 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 T1DRIVER_H_
@@ -26,14 +26,8 @@
FT_BEGIN_HEADER
-#ifdef FT_CONFIG_OPTION_PIC
-#error "this module does not support PIC yet"
-#endif
-
-
FT_EXPORT_VAR( const FT_Driver_ClassRec ) t1_driver_class;
-
FT_END_HEADER
#endif /* T1DRIVER_H_ */
diff --git a/src/3rdparty/freetype/src/type1/t1errors.h b/src/3rdparty/freetype/src/type1/t1errors.h
index 9e0151b957..b35f67a24c 100644
--- a/src/3rdparty/freetype/src/type1/t1errors.h
+++ b/src/3rdparty/freetype/src/type1/t1errors.h
@@ -1,26 +1,26 @@
-/***************************************************************************/
-/* */
-/* t1errors.h */
-/* */
-/* Type 1 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 Type 1 error enumeration constants. */
- /* */
- /*************************************************************************/
+/****************************************************************************
+ *
+ * t1errors.h
+ *
+ * Type 1 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 Type 1 error enumeration constants.
+ *
+ */
#ifndef T1ERRORS_H_
#define T1ERRORS_H_
diff --git a/src/3rdparty/freetype/src/type1/t1gload.c b/src/3rdparty/freetype/src/type1/t1gload.c
index 87d40e7566..f9b115b186 100644
--- a/src/3rdparty/freetype/src/type1/t1gload.c
+++ b/src/3rdparty/freetype/src/type1/t1gload.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1gload.c */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1gload.c
+ *
+ * Type 1 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>
@@ -29,14 +29,14 @@
#include "t1errors.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_t1gload
+#define FT_COMPONENT t1gload
static FT_Error
@@ -62,6 +62,7 @@
PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face );
#endif
+
decoder->font_matrix = type1->font_matrix;
decoder->font_offset = type1->font_offset;
@@ -249,6 +250,8 @@
*max_advance = 0;
+ FT_TRACE6(( "T1_Compute_Max_Advance:\n" ));
+
/* for each glyph, parse the glyph charstring and extract */
/* the advance width */
for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ )
@@ -261,6 +264,9 @@
/* ignore the error if one occurred - skip to next glyph */
}
+ FT_TRACE6(( "T1_Compute_Max_Advance: max advance: %f\n",
+ *max_advance / 65536.0 ));
+
psaux->t1_decoder_funcs->done( &decoder );
return FT_Err_Ok;
@@ -282,11 +288,18 @@
FT_Error error;
+ FT_TRACE5(( "T1_Get_Advances:\n" ));
+
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
{
for ( nn = 0; nn < count; nn++ )
+ {
advances[nn] = 0;
+ FT_TRACE5(( " idx %d: advance height 0 font units\n",
+ first + nn ));
+ }
+
return FT_Err_Ok;
}
@@ -320,6 +333,11 @@
advances[nn] = FIXED_TO_INT( decoder.builder.advance.x );
else
advances[nn] = 0;
+
+ FT_TRACE5(( " idx %d: advance width %d font unit%s\n",
+ first + nn,
+ advances[nn],
+ advances[nn] == 1 ? "" : "s" ));
}
return FT_Err_Ok;
@@ -384,9 +402,9 @@
t1glyph->outline.n_points = 0;
t1glyph->outline.n_contours = 0;
- hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
- ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );
+ hinting = FT_BOOL( !( load_flags & FT_LOAD_NO_SCALE ) &&
+ !( load_flags & FT_LOAD_NO_HINTING ) );
+ scaled = FT_BOOL( !( load_flags & FT_LOAD_NO_SCALE ) );
glyph->hint = hinting;
glyph->scaled = scaled;
@@ -398,7 +416,7 @@
t1glyph,
(FT_Byte**)type1->glyph_names,
face->blend,
- FT_BOOL( hinting ),
+ hinting,
FT_LOAD_TARGET_MODE( load_flags ),
T1_Parse_Glyph );
if ( error )
@@ -406,8 +424,7 @@
must_finish_decoder = TRUE;
- 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 );
decoder.num_subrs = type1->num_subrs;
decoder.subrs = type1->subrs;
@@ -528,7 +545,7 @@
/* First of all, scale the points, if we are not hinting */
- if ( !hinting || ! decoder.builder.hints_funcs )
+ if ( !hinting || !decoder.builder.hints_funcs )
for ( n = cur->n_points; n > 0; n--, vec++ )
{
vec->x = FT_MulFix( vec->x, x_scale );
diff --git a/src/3rdparty/freetype/src/type1/t1gload.h b/src/3rdparty/freetype/src/type1/t1gload.h
index 72ef76f6ae..80440369dc 100644
--- a/src/3rdparty/freetype/src/type1/t1gload.h
+++ b/src/3rdparty/freetype/src/type1/t1gload.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1gload.h */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1gload.h
+ *
+ * Type 1 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 T1GLOAD_H_
diff --git a/src/3rdparty/freetype/src/type1/t1load.c b/src/3rdparty/freetype/src/type1/t1load.c
index 9dfa637a69..5cffdfaac4 100644
--- a/src/3rdparty/freetype/src/type1/t1load.c
+++ b/src/3rdparty/freetype/src/type1/t1load.c
@@ -1,63 +1,63 @@
-/***************************************************************************/
-/* */
-/* t1load.c */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* This is the new and improved Type 1 data loader for FreeType 2. The */
- /* old loader has several problems: it is slow, complex, difficult to */
- /* maintain, and contains incredible hacks to make it accept some */
- /* ill-formed Type 1 fonts without hiccup-ing. Moreover, about 5% of */
- /* the Type 1 fonts on my machine still aren't loaded correctly by it. */
- /* */
- /* This version is much simpler, much faster and also easier to read and */
- /* maintain by a great order of magnitude. The idea behind it is to */
- /* _not_ try to read the Type 1 token stream with a state machine (i.e. */
- /* a Postscript-like interpreter) but rather to perform simple pattern */
- /* matching. */
- /* */
- /* Indeed, nearly all data definitions follow a simple pattern like */
- /* */
- /* ... /Field <data> ... */
- /* */
- /* where <data> can be a number, a boolean, a string, or an array of */
- /* numbers. There are a few exceptions, namely the encoding, font name, */
- /* charstrings, and subrs; they are handled with a special pattern */
- /* matching routine. */
- /* */
- /* All other common cases are handled very simply. The matching rules */
- /* are defined in the file `t1tokens.h' through the use of several */
- /* macros calls PARSE_XXX. This file is included twice here; the first */
- /* time to generate parsing callback functions, the second time to */
- /* generate a table of keywords (with pointers to the associated */
- /* callback functions). */
- /* */
- /* The function `parse_dict' simply scans *linearly* a given dictionary */
- /* (either the top-level or private one) and calls the appropriate */
- /* callback when it encounters an immediate keyword. */
- /* */
- /* This is by far the fastest way one can find to parse and read all */
- /* data. */
- /* */
- /* This led to tremendous code size reduction. Note that later, the */
- /* glyph loader will also be _greatly_ simplified, and the automatic */
- /* hinter will replace the clumsy `t1hinter'. */
- /* */
- /*************************************************************************/
+/****************************************************************************
+ *
+ * t1load.c
+ *
+ * Type 1 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.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * This is the new and improved Type 1 data loader for FreeType 2. The
+ * old loader has several problems: it is slow, complex, difficult to
+ * maintain, and contains incredible hacks to make it accept some
+ * ill-formed Type 1 fonts without hiccup-ing. Moreover, about 5% of
+ * the Type 1 fonts on my machine still aren't loaded correctly by it.
+ *
+ * This version is much simpler, much faster and also easier to read and
+ * maintain by a great order of magnitude. The idea behind it is to
+ * _not_ try to read the Type 1 token stream with a state machine (i.e.
+ * a Postscript-like interpreter) but rather to perform simple pattern
+ * matching.
+ *
+ * Indeed, nearly all data definitions follow a simple pattern like
+ *
+ * ... /Field <data> ...
+ *
+ * where <data> can be a number, a boolean, a string, or an array of
+ * numbers. There are a few exceptions, namely the encoding, font name,
+ * charstrings, and subrs; they are handled with a special pattern
+ * matching routine.
+ *
+ * All other common cases are handled very simply. The matching rules
+ * are defined in the file `t1tokens.h' through the use of several
+ * macros calls PARSE_XXX. This file is included twice here; the first
+ * time to generate parsing callback functions, the second time to
+ * generate a table of keywords (with pointers to the associated
+ * callback functions).
+ *
+ * The function `parse_dict' simply scans *linearly* a given dictionary
+ * (either the top-level or private one) and calls the appropriate
+ * callback when it encounters an immediate keyword.
+ *
+ * This is by far the fastest way one can find to parse and read all
+ * data.
+ *
+ * This led to tremendous code size reduction. Note that later, the
+ * glyph loader will also be _greatly_ simplified, and the automatic
+ * hinter will replace the clumsy `t1hinter'.
+ *
+ */
#include <ft2build.h>
@@ -73,20 +73,20 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
-#define IS_INCREMENTAL (FT_Bool)( face->root.internal->incremental_interface != 0 )
+#define IS_INCREMENTAL FT_BOOL( face->root.internal->incremental_interface )
#else
#define IS_INCREMENTAL 0
#endif
- /*************************************************************************/
- /* */
- /* 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_t1load
+#define FT_COMPONENT t1load
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
@@ -222,11 +222,11 @@
}
- /*************************************************************************/
- /* */
- /* Given a normalized (blend) coordinate, figure out the design */
- /* coordinate appropriate for that value. */
- /* */
+ /**************************************************************************
+ *
+ * Given a normalized (blend) coordinate, figure out the design
+ * coordinate appropriate for that value.
+ */
static FT_Fixed
mm_axis_unmap( PS_DesignMap axismap,
FT_Fixed ncv )
@@ -251,11 +251,11 @@
}
- /*************************************************************************/
- /* */
- /* Given a vector of weights, one for each design, figure out the */
- /* normalized axis coordinates which gave rise to those weights. */
- /* */
+ /**************************************************************************
+ *
+ * Given a vector of weights, one for each design, figure out the
+ * normalized axis coordinates which gave rise to those weights.
+ */
static void
mm_weights_unmap( FT_Fixed* weights,
FT_Fixed* axiscoords,
@@ -293,11 +293,11 @@
}
- /*************************************************************************/
- /* */
- /* Just a wrapper around T1_Get_Multi_Master to support the different */
- /* arguments needed by the GX var distortable fonts. */
- /* */
+ /**************************************************************************
+ *
+ * Just a wrapper around T1_Get_Multi_Master to support the different
+ * arguments needed by the GX var distortable fonts.
+ */
FT_LOCAL_DEF( FT_Error )
T1_Get_MM_Var( T1_Face face,
FT_MM_Var* *master )
@@ -348,16 +348,13 @@
mmvar->axis[i].tag = FT_MAKE_TAG( 'o', 'p', 's', 'z' );
}
- if ( blend->num_designs == ( 1U << blend->num_axis ) )
- {
- mm_weights_unmap( blend->default_weight_vector,
- axiscoords,
- blend->num_axis );
+ mm_weights_unmap( blend->default_weight_vector,
+ axiscoords,
+ blend->num_axis );
- for ( i = 0; i < mmaster.num_axis; i++ )
- mmvar->axis[i].def = mm_axis_unmap( &blend->design_map[i],
- axiscoords[i] );
- }
+ for ( i = 0; i < mmaster.num_axis; i++ )
+ mmvar->axis[i].def = mm_axis_unmap( &blend->design_map[i],
+ axiscoords[i] );
*master = mmvar;
@@ -387,24 +384,31 @@
for ( n = 0; n < blend->num_designs; n++ )
{
FT_Fixed result = 0x10000L; /* 1.0 fixed */
+ FT_Fixed factor;
for ( m = 0; m < blend->num_axis; m++ )
{
- FT_Fixed factor;
-
-
- /* get current blend axis position; */
/* use a default value if we don't have a coordinate */
- factor = m < num_coords ? coords[m] : 0x8000;
- if ( factor < 0 )
- factor = 0;
- if ( factor > 0x10000L )
- factor = 0x10000L;
+ if ( m >= num_coords )
+ {
+ result >>= 1;
+ continue;
+ }
+ /* get current blend axis position */
+ factor = coords[m];
if ( ( n & ( 1 << m ) ) == 0 )
factor = 0x10000L - factor;
+ if ( factor <= 0 )
+ {
+ result = 0;
+ break;
+ }
+ else if ( factor >= 0x10000L )
+ continue;
+
result = FT_MulFix( result, factor );
}
@@ -477,6 +481,75 @@
FT_LOCAL_DEF( FT_Error )
+ T1_Set_MM_WeightVector( T1_Face face,
+ FT_UInt len,
+ FT_Fixed* weightvector )
+ {
+ PS_Blend blend = face->blend;
+ FT_UInt i, n;
+
+
+ if ( !blend )
+ return FT_THROW( Invalid_Argument );
+
+ if ( !len && !weightvector )
+ {
+ for ( i = 0; i < blend->num_designs; i++ )
+ blend->weight_vector[i] = blend->default_weight_vector[i];
+ }
+ else
+ {
+ if ( !weightvector )
+ return FT_THROW( Invalid_Argument );
+
+ n = len < blend->num_designs ? len : blend->num_designs;
+
+ for ( i = 0; i < n; i++ )
+ blend->weight_vector[i] = weightvector[i];
+
+ for ( ; i < blend->num_designs; i++ )
+ blend->weight_vector[i] = (FT_Fixed)0;
+
+ if ( len )
+ face->root.face_flags |= FT_FACE_FLAG_VARIATION;
+ else
+ face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
+ }
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ T1_Get_MM_WeightVector( T1_Face face,
+ FT_UInt* len,
+ FT_Fixed* weightvector )
+ {
+ PS_Blend blend = face->blend;
+ FT_UInt i;
+
+
+ if ( !blend )
+ return FT_THROW( Invalid_Argument );
+
+ if ( *len < blend->num_designs )
+ {
+ *len = blend->num_designs;
+ return FT_THROW( Invalid_Argument );
+ }
+
+ for ( i = 0; i < blend->num_designs; i++ )
+ weightvector[i] = blend->weight_vector[i];
+ for ( ; i < *len; i++ )
+ weightvector[i] = (FT_Fixed)0;
+
+ *len = blend->num_designs;
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
T1_Set_MM_Design( T1_Face face,
FT_UInt num_coords,
FT_Long* coords )
@@ -573,11 +646,11 @@
}
- /*************************************************************************/
- /* */
- /* Just a wrapper around T1_Set_MM_Design to support the different */
- /* arguments needed by the GX var distortable fonts. */
- /* */
+ /**************************************************************************
+ *
+ * Just a wrapper around T1_Set_MM_Design to support the different
+ * arguments needed by the GX var distortable fonts.
+ */
FT_LOCAL_DEF( FT_Error )
T1_Set_Var_Design( T1_Face face,
FT_UInt num_coords,
@@ -719,6 +792,8 @@
if ( error )
goto Exit;
+ FT_TRACE4(( " [" ));
+
blend = face->blend;
memory = face->root.memory;
@@ -741,11 +816,13 @@
goto Exit;
}
+ FT_TRACE4(( " /%.*s", len, token->start ));
+
name = (FT_Byte*)blend->axis_names[n];
if ( name )
{
FT_TRACE0(( "parse_blend_axis_types:"
- " overwriting axis name `%s' with `%*.s'\n",
+ " overwriting axis name `%s' with `%.*s'\n",
name, len, token->start ));
FT_FREE( name );
}
@@ -758,6 +835,8 @@
name[len] = '\0';
}
+ FT_TRACE4(( "]\n" ));
+
Exit:
loader->parser.root.error = error;
}
@@ -802,6 +881,8 @@
blend = face->blend;
num_axis = 0; /* make compiler happy */
+ FT_TRACE4(( " [" ));
+
for ( n = 0; n < num_designs; n++ )
{
T1_TokenRec axis_tokens[T1_MAX_MM_AXIS];
@@ -842,6 +923,7 @@
}
/* now read each axis token into the design position */
+ FT_TRACE4(( " [" )) ;
for ( axis = 0; axis < n_axis; axis++ )
{
T1_Token token2 = axis_tokens + axis;
@@ -850,9 +932,13 @@
parser->root.cursor = token2->start;
parser->root.limit = token2->limit;
blend->design_pos[n][axis] = T1_ToFixed( parser, 0 );
+ FT_TRACE4(( " %f", (double)blend->design_pos[n][axis] / 65536 ));
}
+ FT_TRACE4(( "]" )) ;
}
+ FT_TRACE4(( "]\n" ));
+
loader->parser.root.cursor = old_cursor;
loader->parser.root.limit = old_limit;
}
@@ -899,6 +985,8 @@
goto Exit;
blend = face->blend;
+ FT_TRACE4(( " [" ));
+
/* now read each axis design map */
for ( n = 0; n < num_axis; n++ )
{
@@ -915,6 +1003,8 @@
T1_ToTokenArray( parser, point_tokens,
T1_MAX_MM_MAP_POINTS, &num_points );
+ FT_TRACE4(( " [" ));
+
if ( num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS )
{
FT_ERROR(( "parse_blend_design_map: incorrect table\n" ));
@@ -948,9 +1038,17 @@
map->design_points[p] = T1_ToInt( parser );
map->blend_points [p] = T1_ToFixed( parser, 0 );
+
+ FT_TRACE4(( " [%d %f]",
+ map->design_points[p],
+ (double)map->blend_points[p] / 65536 ));
}
+
+ FT_TRACE4(( "]" ));
}
+ FT_TRACE4(( "]\n" ));
+
parser->root.cursor = old_cursor;
parser->root.limit = old_limit;
@@ -1010,6 +1108,8 @@
old_cursor = parser->root.cursor;
old_limit = parser->root.limit;
+ FT_TRACE4(( "[" ));
+
for ( n = 0; n < num_designs; n++ )
{
token = design_tokens + n;
@@ -1018,8 +1118,12 @@
blend->default_weight_vector[n] =
blend->weight_vector[n] = T1_ToFixed( parser, 0 );
+
+ FT_TRACE4(( " %f", (double)blend->weight_vector[n] / 65536 ));
}
+ FT_TRACE4(( "]\n" ));
+
parser->root.cursor = old_cursor;
parser->root.limit = old_limit;
@@ -1036,6 +1140,20 @@
{
face->len_buildchar = (FT_UInt)T1_ToFixedArray( &loader->parser,
0, NULL, 0 );
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt i;
+
+
+ FT_TRACE4(( " [" ));
+ for ( i = 0; i < face->len_buildchar; i++ )
+ FT_TRACE4(( " 0" ));
+
+ FT_TRACE4(( "]\n" ));
+ }
+#endif
+
return;
}
@@ -1071,6 +1189,8 @@
/* if the keyword has a dedicated callback, call it */
if ( field->type == T1_FIELD_TYPE_CALLBACK )
{
+ FT_TRACE4(( " %s", field->ident ));
+
field->reader( (FT_Face)face, loader );
error = loader->parser.root.error;
goto Exit;
@@ -1148,6 +1268,8 @@
max_objects = 0;
}
+ FT_TRACE4(( " %s", field->ident ));
+
if ( *objects )
{
if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
@@ -1167,6 +1289,8 @@
error = FT_Err_Ok;
}
+ FT_TRACE4(( "\n" ));
+
Exit:
return error;
}
@@ -1179,6 +1303,8 @@
FT_UNUSED( face );
loader->keywords_encountered |= T1_PRIVATE;
+
+ FT_TRACE4(( "\n" ));
}
@@ -1258,6 +1384,14 @@
return;
}
+ 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 )
@@ -1280,12 +1414,18 @@
temp[5] = FT_DivFix( temp[5], temp_scale );
temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;
}
-
matrix->xx = temp[0];
matrix->yx = temp[1];
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 );
+ return;
+ }
+
/* note that the offsets must be expressed in integer font units */
offset->x = temp[4] >> 16;
offset->y = temp[5] >> 16;
@@ -1367,12 +1507,7 @@
/* We need to `zero' out encoding_table.elements */
for ( n = 0; n < array_size; n++ )
- {
- char* notdef = (char *)".notdef";
-
-
- (void)T1_Add_Table( char_table, n, notdef, 8 );
- }
+ (void)T1_Add_Table( char_table, n, ".notdef", 8 );
/* Now we need to read records of the form */
/* */
@@ -1494,6 +1629,15 @@
T1_Skip_Spaces( parser );
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " [" ));
+
+ /* XXX show encoding vector */
+ FT_TRACE4(( "..." ));
+
+ FT_TRACE4(( "]\n" ));
+#endif
+
face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;
parser->root.cursor = cur;
}
@@ -1504,18 +1648,30 @@
{
if ( cur + 17 < limit &&
ft_strncmp( (const char*)cur, "StandardEncoding", 16 ) == 0 )
+ {
face->type1.encoding_type = T1_ENCODING_TYPE_STANDARD;
+ FT_TRACE4(( " StandardEncoding\n" ));
+ }
else if ( cur + 15 < limit &&
ft_strncmp( (const char*)cur, "ExpertEncoding", 14 ) == 0 )
+ {
face->type1.encoding_type = T1_ENCODING_TYPE_EXPERT;
+ FT_TRACE4(( " ExpertEncoding\n" ));
+ }
else if ( cur + 18 < limit &&
ft_strncmp( (const char*)cur, "ISOLatin1Encoding", 17 ) == 0 )
+ {
face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;
+ FT_TRACE4(( " ISOLatin1Encoding\n" ));
+ }
else
+ {
parser->root.error = FT_ERR( Ignore );
+ FT_TRACE4(( "<unknown>\n" ));
+ }
}
}
@@ -1696,6 +1852,15 @@
if ( !loader->num_subrs )
loader->num_subrs = num_subrs;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " <" ));
+
+ /* XXX show subrs? */
+ FT_TRACE4(( "%d elements", num_subrs ));
+
+ FT_TRACE4(( ">\n" ));
+#endif
+
return;
Fail:
@@ -1977,7 +2142,6 @@
/* 0 333 hsbw endchar */
FT_Byte notdef_glyph[] = { 0x8B, 0xF7, 0xE1, 0x0D, 0x0E };
- char* notdef_name = (char *)".notdef";
error = T1_Add_Table( swap_table, 0,
@@ -1992,7 +2156,7 @@
if ( error )
goto Fail;
- error = T1_Add_Table( name_table, 0, notdef_name, 8 );
+ error = T1_Add_Table( name_table, 0, ".notdef", 8 );
if ( error )
goto Fail;
@@ -2017,6 +2181,15 @@
loader->num_glyphs += 1;
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " <" ));
+
+ /* XXX show charstrings? */
+ FT_TRACE4(( "%d elements", loader->num_glyphs ));
+
+ FT_TRACE4(( ">\n" ));
+#endif
+
return;
Fail:
@@ -2024,12 +2197,12 @@
}
- /*************************************************************************/
- /* */
- /* Define the token field static variables. This is a set of */
- /* T1_FieldRec variables. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * Define the token field static variables. This is a set of
+ * T1_FieldRec variables.
+ *
+ */
static
@@ -2216,6 +2389,7 @@
? T1_FIELD_DICT_PRIVATE
: T1_FIELD_DICT_FONTDICT;
+
if ( !( dict & keyword->dict ) )
{
FT_TRACE1(( "parse_dict: found `%s' but ignoring it"
@@ -2330,6 +2504,7 @@
if ( error )
goto Exit;
+ FT_TRACE4(( " top dictionary:\n" ));
error = parse_dict( face, &loader,
parser->base_dict, parser->base_len );
if ( error )
@@ -2339,6 +2514,7 @@
if ( error )
goto Exit;
+ FT_TRACE4(( " private dictionary:\n" ));
error = parse_dict( face, &loader,
parser->private_dict, parser->private_len );
if ( error )
@@ -2349,6 +2525,16 @@
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
+ /* we don't support Multiple Master fonts with intermediate designs; */
+ /* this implies that `num_designs' must be equal to `2^^num_axis' */
+ if ( face->blend &&
+ face->blend->num_designs != ( 1U << face->blend->num_axis ) )
+ {
+ FT_ERROR(( "T1_Open_Face:"
+ " number-of-designs != 2 ^^ number-of-axes\n" ));
+ T1_Done_Blend( face );
+ }
+
if ( face->blend &&
face->blend->num_default_design_vector != 0 &&
face->blend->num_default_design_vector != face->blend->num_axis )
@@ -2441,8 +2627,7 @@
/* we must now build type1.encoding when we have a custom array */
if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )
{
- FT_Int charcode, idx, min_char, max_char;
- FT_Byte* glyph_name;
+ FT_Int charcode, idx, min_char, max_char;
/* OK, we do the following: for each element in the encoding */
@@ -2456,27 +2641,27 @@
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
{
- FT_Byte* char_name;
+ const FT_String* char_name =
+ (const FT_String*)loader.encoding_table.elements[charcode];
type1->encoding.char_index[charcode] = 0;
- type1->encoding.char_name [charcode] = (char *)".notdef";
+ type1->encoding.char_name [charcode] = ".notdef";
- char_name = loader.encoding_table.elements[charcode];
if ( char_name )
for ( idx = 0; idx < type1->num_glyphs; idx++ )
{
- glyph_name = (FT_Byte*)type1->glyph_names[idx];
- if ( ft_strcmp( (const char*)char_name,
- (const char*)glyph_name ) == 0 )
+ const FT_String* glyph_name = type1->glyph_names[idx];
+
+
+ if ( ft_strcmp( char_name, glyph_name ) == 0 )
{
type1->encoding.char_index[charcode] = (FT_UShort)idx;
- type1->encoding.char_name [charcode] = (char*)glyph_name;
+ type1->encoding.char_name [charcode] = glyph_name;
/* Change min/max encoded char only if glyph name is */
/* not /.notdef */
- if ( ft_strcmp( (const char*)".notdef",
- (const char*)glyph_name ) != 0 )
+ if ( ft_strcmp( ".notdef", glyph_name ) != 0 )
{
if ( charcode < min_char )
min_char = charcode;
diff --git a/src/3rdparty/freetype/src/type1/t1load.h b/src/3rdparty/freetype/src/type1/t1load.h
index 03be3f7f93..44f835bde2 100644
--- a/src/3rdparty/freetype/src/type1/t1load.h
+++ b/src/3rdparty/freetype/src/type1/t1load.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1load.h */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1load.h
+ *
+ * Type 1 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 T1LOAD_H_
@@ -106,6 +106,16 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
T1_Done_Blend( T1_Face face );
+ FT_LOCAL( FT_Error )
+ T1_Set_MM_WeightVector( T1_Face face,
+ FT_UInt len,
+ FT_Fixed* weightvector );
+
+ FT_LOCAL( FT_Error )
+ T1_Get_MM_WeightVector( T1_Face face,
+ FT_UInt* len,
+ FT_Fixed* weightvector );
+
#endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */
diff --git a/src/3rdparty/freetype/src/type1/t1objs.c b/src/3rdparty/freetype/src/type1/t1objs.c
index 7333c4c958..741388a645 100644
--- a/src/3rdparty/freetype/src/type1/t1objs.c
+++ b/src/3rdparty/freetype/src/type1/t1objs.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1objs.c */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1objs.c
+ *
+ * Type 1 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>
@@ -36,21 +36,21 @@
#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_t1objs
+#define FT_COMPONENT t1objs
- /*************************************************************************/
- /* */
- /* SIZE FUNCTIONS */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * SIZE FUNCTIONS
+ *
+ */
static PSH_Globals_Funcs
@@ -133,11 +133,11 @@
}
- /*************************************************************************/
- /* */
- /* SLOT FUNCTIONS */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * SLOT FUNCTIONS
+ *
+ */
FT_LOCAL_DEF( void )
T1_GlyphSlot_Done( FT_GlyphSlot slot )
@@ -177,24 +177,25 @@
}
- /*************************************************************************/
- /* */
- /* FACE FUNCTIONS */
- /* */
- /*************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* T1_Face_Done */
- /* */
- /* <Description> */
- /* The face object destructor. */
- /* */
- /* <Input> */
- /* face :: A typeless pointer to the face object to destroy. */
- /* */
+ /**************************************************************************
+ *
+ * FACE FUNCTIONS
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @Function:
+ * T1_Face_Done
+ *
+ * @Description:
+ * The face object destructor.
+ *
+ * @Input:
+ * face ::
+ * A typeless pointer to the face object to destroy.
+ */
FT_LOCAL_DEF( void )
T1_Face_Done( FT_Face t1face ) /* T1_Face */
{
@@ -274,29 +275,34 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* T1_Face_Init */
- /* */
- /* <Description> */
- /* The face object constructor. */
- /* */
- /* <Input> */
- /* stream :: input stream where to load font data. */
- /* */
- /* 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 face record to build. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * T1_Face_Init
+ *
+ * @Description:
+ * The face object constructor.
+ *
+ * @Input:
+ * stream ::
+ * input stream where to load font data.
+ *
+ * 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 face record to build.
+ *
+ * @Return:
+ * FreeType error code. 0 means success.
+ */
FT_LOCAL_DEF( FT_Error )
T1_Face_Init( FT_Stream stream,
FT_Face t1face, /* T1_Face */
@@ -341,6 +347,10 @@
if ( error )
goto Exit;
+ FT_TRACE2(( "T1_Face_Init: %08p (index %d)\n",
+ face,
+ face_index ));
+
/* if we just wanted to check the format, leave successfully now */
if ( face_index < 0 )
goto Exit;
@@ -516,7 +526,8 @@
error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
if ( error &&
- FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+ FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
+ FT_ERR_NEQ( error, Unimplemented_Feature ) )
goto Exit;
error = FT_Err_Ok;
@@ -564,20 +575,21 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* T1_Driver_Init */
- /* */
- /* <Description> */
- /* Initializes a given Type 1 driver object. */
- /* */
- /* <Input> */
- /* driver :: A handle to the target driver object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * T1_Driver_Init
+ *
+ * @Description:
+ * Initializes a given Type 1 driver object.
+ *
+ * @Input:
+ * driver ::
+ * A handle to the target driver object.
+ *
+ * @Return:
+ * FreeType error code. 0 means success.
+ */
FT_LOCAL_DEF( FT_Error )
T1_Driver_Init( FT_Module module )
{
@@ -620,17 +632,18 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* T1_Driver_Done */
- /* */
- /* <Description> */
- /* Finalizes a given Type 1 driver. */
- /* */
- /* <Input> */
- /* driver :: A handle to the target Type 1 driver. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * T1_Driver_Done
+ *
+ * @Description:
+ * Finalizes a given Type 1 driver.
+ *
+ * @Input:
+ * driver ::
+ * A handle to the target Type 1 driver.
+ */
FT_LOCAL_DEF( void )
T1_Driver_Done( FT_Module driver )
{
diff --git a/src/3rdparty/freetype/src/type1/t1objs.h b/src/3rdparty/freetype/src/type1/t1objs.h
index 8298e036f4..2161091f77 100644
--- a/src/3rdparty/freetype/src/type1/t1objs.h
+++ b/src/3rdparty/freetype/src/type1/t1objs.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1objs.h */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1objs.h
+ *
+ * Type 1 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 T1OBJS_H_
@@ -34,59 +34,59 @@ FT_BEGIN_HEADER
typedef struct T1_Glyph_Hints_ T1_Glyph_Hints;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* T1_Size */
- /* */
- /* <Description> */
- /* A handle to a Type 1 size object. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * T1_Size
+ *
+ * @Description:
+ * A handle to a Type 1 size object.
+ */
typedef struct T1_SizeRec_* T1_Size;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* T1_GlyphSlot */
- /* */
- /* <Description> */
- /* A handle to a Type 1 glyph slot object. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * T1_GlyphSlot
+ *
+ * @Description:
+ * A handle to a Type 1 glyph slot object.
+ */
typedef struct T1_GlyphSlotRec_* T1_GlyphSlot;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* T1_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:
+ * T1_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 T1_CharMapRec_* T1_CharMap;
- /*************************************************************************/
- /* */
- /* HERE BEGINS THE TYPE1 SPECIFIC STUFF */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * HERE BEGINS THE TYPE1 SPECIFIC STUFF
+ *
+ */
- /*************************************************************************/
- /* */
- /* <Type> */
- /* T1_SizeRec */
- /* */
- /* <Description> */
- /* Type 1 size record. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * T1_SizeRec
+ *
+ * @Description:
+ * Type 1 size record.
+ */
typedef struct T1_SizeRec_
{
FT_SizeRec root;
@@ -105,14 +105,14 @@ FT_BEGIN_HEADER
T1_Size_Init( FT_Size size );
- /*************************************************************************/
- /* */
- /* <Type> */
- /* T1_GlyphSlotRec */
- /* */
- /* <Description> */
- /* Type 1 glyph slot record. */
- /* */
+ /**************************************************************************
+ *
+ * @Type:
+ * T1_GlyphSlotRec
+ *
+ * @Description:
+ * Type 1 glyph slot record.
+ */
typedef struct T1_GlyphSlotRec_
{
FT_GlyphSlotRec root;
diff --git a/src/3rdparty/freetype/src/type1/t1parse.c b/src/3rdparty/freetype/src/type1/t1parse.c
index 8e201e5ef5..56caeb9e40 100644
--- a/src/3rdparty/freetype/src/type1/t1parse.c
+++ b/src/3rdparty/freetype/src/type1/t1parse.c
@@ -1,36 +1,36 @@
-/***************************************************************************/
-/* */
-/* t1parse.c */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* The Type 1 parser is in charge of the following: */
- /* */
- /* - provide an implementation of a growing sequence of objects called */
- /* a `T1_Table' (used to build various tables needed by the loader). */
- /* */
- /* - opening .pfb and .pfa files to extract their top-level and private */
- /* dictionaries. */
- /* */
- /* - read numbers, arrays & strings from any dictionary. */
- /* */
- /* See `t1load.c' to see how data is loaded from the font file. */
- /* */
- /*************************************************************************/
+/****************************************************************************
+ *
+ * t1parse.c
+ *
+ * Type 1 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.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * The Type 1 parser is in charge of the following:
+ *
+ * - provide an implementation of a growing sequence of objects called
+ * a `T1_Table' (used to build various tables needed by the loader).
+ *
+ * - opening .pfb and .pfa files to extract their top-level and private
+ * dictionaries.
+ *
+ * - read numbers, arrays & strings from any dictionary.
+ *
+ * See `t1load.c' to see how data is loaded from the font file.
+ *
+ */
#include <ft2build.h>
@@ -43,14 +43,14 @@
#include "t1errors.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_t1parse
+#define FT_COMPONENT t1parse
/*************************************************************************/
@@ -169,21 +169,21 @@
}
}
- /******************************************************************/
- /* */
- /* Here a short summary of what is going on: */
- /* */
- /* When creating a new Type 1 parser, we try to locate and load */
- /* the base dictionary if this is possible (i.e., for PFB */
- /* files). Otherwise, we load the whole font into memory. */
- /* */
- /* When `loading' the base dictionary, we only setup pointers */
- /* in the case of a memory-based stream. Otherwise, we */
- /* allocate and load the base dictionary in it. */
- /* */
- /* parser->in_pfb is set if we are in a binary (`.pfb') font. */
- /* parser->in_memory is set if we have a memory stream. */
- /* */
+ /*******************************************************************
+ *
+ * Here a short summary of what is going on:
+ *
+ * When creating a new Type 1 parser, we try to locate and load
+ * the base dictionary if this is possible (i.e., for PFB
+ * files). Otherwise, we load the whole font into memory.
+ *
+ * When `loading' the base dictionary, we only setup pointers
+ * in the case of a memory-based stream. Otherwise, we
+ * allocate and load the base dictionary in it.
+ *
+ * parser->in_pfb is set if we are in a binary (`.pfb') font.
+ * parser->in_memory is set if we have a memory stream.
+ */
/* try to compute the size of the base dictionary; */
/* look for a Postscript binary file tag, i.e., 0x8001 */
diff --git a/src/3rdparty/freetype/src/type1/t1parse.h b/src/3rdparty/freetype/src/type1/t1parse.h
index 4ac82ae913..dab8fddc8b 100644
--- a/src/3rdparty/freetype/src/type1/t1parse.h
+++ b/src/3rdparty/freetype/src/type1/t1parse.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1parse.h */
-/* */
-/* Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1parse.h
+ *
+ * Type 1 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 T1PARSE_H_
@@ -28,36 +28,45 @@
FT_BEGIN_HEADER
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* T1_ParserRec */
- /* */
- /* <Description> */
- /* A PS_ParserRec is an object used to parse a Type 1 fonts very */
- /* quickly. */
- /* */
- /* <Fields> */
- /* root :: The root parser. */
- /* */
- /* stream :: The current input stream. */
- /* */
- /* base_dict :: A pointer to the top-level dictionary. */
- /* */
- /* base_len :: The length in bytes of the top dictionary. */
- /* */
- /* private_dict :: A pointer to the private dictionary. */
- /* */
- /* private_len :: The length in bytes of the private dictionary. */
- /* */
- /* in_pfb :: A boolean. Indicates that we are handling a PFB */
- /* file. */
- /* */
- /* in_memory :: A boolean. Indicates a memory-based stream. */
- /* */
- /* single_block :: A boolean. Indicates that the private dictionary */
- /* is stored in lieu of the base dictionary. */
- /* */
+ /**************************************************************************
+ *
+ * @Struct:
+ * T1_ParserRec
+ *
+ * @Description:
+ * A PS_ParserRec is an object used to parse a Type 1 fonts very
+ * quickly.
+ *
+ * @Fields:
+ * root ::
+ * The root parser.
+ *
+ * stream ::
+ * The current input stream.
+ *
+ * base_dict ::
+ * A pointer to the top-level dictionary.
+ *
+ * base_len ::
+ * The length in bytes of the top dictionary.
+ *
+ * private_dict ::
+ * A pointer to the private dictionary.
+ *
+ * private_len ::
+ * The length in bytes of the private dictionary.
+ *
+ * in_pfb ::
+ * A boolean. Indicates that we are handling a PFB
+ * file.
+ *
+ * in_memory ::
+ * A boolean. Indicates a memory-based stream.
+ *
+ * single_block ::
+ * A boolean. Indicates that the private dictionary
+ * is stored in lieu of the base dictionary.
+ */
typedef struct T1_ParserRec_
{
PS_ParserRec root;
diff --git a/src/3rdparty/freetype/src/type1/t1tokens.h b/src/3rdparty/freetype/src/type1/t1tokens.h
index 43a65d88ea..97f2dbe0cf 100644
--- a/src/3rdparty/freetype/src/type1/t1tokens.h
+++ b/src/3rdparty/freetype/src/type1/t1tokens.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t1tokens.h */
-/* */
-/* Type 1 tokenizer (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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t1tokens.h
+ *
+ * Type 1 tokenizer (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.
+ *
+ */
#undef FT_STRUCTURE
diff --git a/src/3rdparty/freetype/src/type1/type1.c b/src/3rdparty/freetype/src/type1/type1.c
index 72eff59bfe..ce8557a5fb 100644
--- a/src/3rdparty/freetype/src/type1/type1.c
+++ b/src/3rdparty/freetype/src/type1/type1.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* type1.c */
-/* */
-/* FreeType Type 1 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * type1.c
+ *
+ * FreeType Type 1 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