summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/psaux
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-11-02 07:10:28 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-11-03 16:21:10 +0000
commitdba44cd4e5754b579f2184a864ffe7b79b0a7e56 (patch)
treec8829051b16c8a78f049fb05bae9322293143c91 /src/3rdparty/freetype/src/psaux
parente056be144a0207699b42a01b6d4cb6f19be474d7 (diff)
Update bundled FreeType to 2.6.1
Change-Id: Ic489f8aa8ad42da3922f542e6c9064afe44f3799 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/freetype/src/psaux')
-rw-r--r--src/3rdparty/freetype/src/psaux/Jamfile10
-rw-r--r--src/3rdparty/freetype/src/psaux/afmparse.c45
-rw-r--r--src/3rdparty/freetype/src/psaux/afmparse.h5
-rw-r--r--src/3rdparty/freetype/src/psaux/module.mk2
-rw-r--r--src/3rdparty/freetype/src/psaux/psaux.c2
-rw-r--r--src/3rdparty/freetype/src/psaux/psauxerr.h2
-rw-r--r--src/3rdparty/freetype/src/psaux/psauxmod.c2
-rw-r--r--src/3rdparty/freetype/src/psaux/psauxmod.h2
-rw-r--r--src/3rdparty/freetype/src/psaux/psconv.c6
-rw-r--r--src/3rdparty/freetype/src/psaux/psconv.h2
-rw-r--r--src/3rdparty/freetype/src/psaux/psobjs.c45
-rw-r--r--src/3rdparty/freetype/src/psaux/psobjs.h12
-rw-r--r--src/3rdparty/freetype/src/psaux/rules.mk7
-rw-r--r--src/3rdparty/freetype/src/psaux/t1cmap.c10
-rw-r--r--src/3rdparty/freetype/src/psaux/t1cmap.h2
-rw-r--r--src/3rdparty/freetype/src/psaux/t1decode.c32
-rw-r--r--src/3rdparty/freetype/src/psaux/t1decode.h2
17 files changed, 105 insertions, 83 deletions
diff --git a/src/3rdparty/freetype/src/psaux/Jamfile b/src/3rdparty/freetype/src/psaux/Jamfile
index faeded9044..6793f0d581 100644
--- a/src/3rdparty/freetype/src/psaux/Jamfile
+++ b/src/3rdparty/freetype/src/psaux/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/psaux Jamfile
#
-# Copyright 2001, 2002 by
+# Copyright 2001-2015 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -16,8 +16,12 @@ SubDir FT2_TOP $(FT2_SRC_DIR) psaux ;
if $(FT2_MULTI)
{
- _sources = psauxmod psobjs t1decode t1cmap
- psconv afmparse
+ _sources = afmparse
+ psauxmod
+ psconv
+ psobjs
+ t1cmap
+ t1decode
;
}
else
diff --git a/src/3rdparty/freetype/src/psaux/afmparse.c b/src/3rdparty/freetype/src/psaux/afmparse.c
index 6a40e110dc..3ad44ec724 100644
--- a/src/3rdparty/freetype/src/psaux/afmparse.c
+++ b/src/3rdparty/freetype/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006-2010, 2012, 2013 by */
+/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -75,8 +75,8 @@
#define AFM_STREAM_KEY_BEGIN( stream ) \
(char*)( (stream)->cursor - 1 )
-#define AFM_STREAM_KEY_LEN( stream, key ) \
- ( (char*)(stream)->cursor - key - 1 )
+#define AFM_STREAM_KEY_LEN( stream, key ) \
+ (FT_Offset)( (char*)(stream)->cursor - key - 1 )
#define AFM_STATUS_EOC( stream ) \
( (stream)->status >= AFM_STREAM_STATUS_EOC )
@@ -369,11 +369,11 @@
FT_LOCAL_DEF( FT_Int )
afm_parser_read_vals( AFM_Parser parser,
AFM_Value vals,
- FT_UInt n )
+ FT_Int n )
{
AFM_Stream stream = parser->stream;
char* str;
- FT_UInt i;
+ FT_Int i;
if ( n > AFM_MAX_ARGUMENTS )
@@ -446,7 +446,7 @@
FT_Offset* len )
{
AFM_Stream stream = parser->stream;
- char* key = 0; /* make stupid compiler happy */
+ char* key = NULL; /* make stupid compiler happy */
if ( line )
@@ -562,7 +562,7 @@
}
- FT_LOCAL_DEF( FT_Error )
+ static FT_Error
afm_parser_read_int( AFM_Parser parser,
FT_Int* aint )
{
@@ -590,11 +590,17 @@
char* key;
FT_Offset len;
int n = -1;
+ FT_Int tmp;
- if ( afm_parser_read_int( parser, &fi->NumTrackKern ) )
+ if ( afm_parser_read_int( parser, &tmp ) )
goto Fail;
+ if ( tmp < 0 )
+ goto Fail;
+
+ fi->NumTrackKern = (FT_UInt)tmp;
+
if ( fi->NumTrackKern )
{
FT_Memory memory = parser->memory;
@@ -615,7 +621,7 @@
case AFM_TOKEN_TRACKKERN:
n++;
- if ( n >= fi->NumTrackKern )
+ if ( n >= (int)fi->NumTrackKern )
goto Fail;
tk = fi->TrackKerns + n;
@@ -639,7 +645,7 @@
case AFM_TOKEN_ENDTRACKKERN:
case AFM_TOKEN_ENDKERNDATA:
case AFM_TOKEN_ENDFONTMETRICS:
- fi->NumTrackKern = n + 1;
+ fi->NumTrackKern = (FT_UInt)( n + 1 );
return FT_Err_Ok;
case AFM_TOKEN_UNKNOWN:
@@ -688,11 +694,17 @@
char* key;
FT_Offset len;
int n = -1;
+ FT_Int tmp;
+
+ if ( afm_parser_read_int( parser, &tmp ) )
+ goto Fail;
- if ( afm_parser_read_int( parser, &fi->NumKernPair ) )
+ if ( tmp < 0 )
goto Fail;
+ fi->NumKernPair = (FT_UInt)tmp;
+
if ( fi->NumKernPair )
{
FT_Memory memory = parser->memory;
@@ -720,7 +732,7 @@
n++;
- if ( n >= fi->NumKernPair )
+ if ( n >= (int)fi->NumKernPair )
goto Fail;
kp = fi->KernPairs + n;
@@ -733,8 +745,9 @@
if ( r < 3 )
goto Fail;
- kp->index1 = shared_vals[0].u.i;
- kp->index2 = shared_vals[1].u.i;
+ /* index values can't be negative */
+ kp->index1 = shared_vals[0].u.u;
+ kp->index2 = shared_vals[1].u.u;
if ( token == AFM_TOKEN_KPY )
{
kp->x = 0;
@@ -752,7 +765,7 @@
case AFM_TOKEN_ENDKERNPAIRS:
case AFM_TOKEN_ENDKERNDATA:
case AFM_TOKEN_ENDFONTMETRICS:
- fi->NumKernPair = n + 1;
+ fi->NumKernPair = (FT_UInt)( n + 1 );
ft_qsort( fi->KernPairs, fi->NumKernPair,
sizeof ( AFM_KernPairRec ),
afm_compare_kern_pairs );
@@ -815,7 +828,7 @@
static FT_Error
afm_parser_skip_section( AFM_Parser parser,
- FT_UInt n,
+ FT_Int n,
AFM_Token end_section )
{
char* key;
diff --git a/src/3rdparty/freetype/src/psaux/afmparse.h b/src/3rdparty/freetype/src/psaux/afmparse.h
index 35d96046c5..f922c4ebde 100644
--- a/src/3rdparty/freetype/src/psaux/afmparse.h
+++ b/src/3rdparty/freetype/src/psaux/afmparse.h
@@ -4,7 +4,7 @@
/* */
/* AFM parser (specification). */
/* */
-/* Copyright 2006 by */
+/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,6 +61,7 @@ FT_BEGIN_HEADER
char* s;
FT_Fixed f;
FT_Int i;
+ FT_UInt u;
FT_Bool b;
} u;
@@ -72,7 +73,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Int )
afm_parser_read_vals( AFM_Parser parser,
AFM_Value vals,
- FT_UInt n );
+ FT_Int n );
/* read the next key from the next line or column */
FT_LOCAL( char* )
diff --git a/src/3rdparty/freetype/src/psaux/module.mk b/src/3rdparty/freetype/src/psaux/module.mk
index 42bf6f5199..1d90e14ce4 100644
--- a/src/3rdparty/freetype/src/psaux/module.mk
+++ b/src/3rdparty/freetype/src/psaux/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2006 by
+# Copyright 1996-2015 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/psaux/psaux.c b/src/3rdparty/freetype/src/psaux/psaux.c
index a4b9c5c6e4..7f1d9aa595 100644
--- a/src/3rdparty/freetype/src/psaux/psaux.c
+++ b/src/3rdparty/freetype/src/psaux/psaux.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript driver component (body only). */
/* */
-/* Copyright 1996-2001, 2002, 2006 by */
+/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/3rdparty/freetype/src/psaux/psauxerr.h b/src/3rdparty/freetype/src/psaux/psauxerr.h
index d52375f8cb..97712f0795 100644
--- a/src/3rdparty/freetype/src/psaux/psauxerr.h
+++ b/src/3rdparty/freetype/src/psaux/psauxerr.h
@@ -4,7 +4,7 @@
/* */
/* PS auxiliary module error codes (specification only). */
/* */
-/* Copyright 2001, 2012 by */
+/* Copyright 2001-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/3rdparty/freetype/src/psaux/psauxmod.c b/src/3rdparty/freetype/src/psaux/psauxmod.c
index 4b1249d49b..06fcab0c4a 100644
--- a/src/3rdparty/freetype/src/psaux/psauxmod.c
+++ b/src/3rdparty/freetype/src/psaux/psauxmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript module implementation (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2006 by */
+/* Copyright 2000-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/3rdparty/freetype/src/psaux/psauxmod.h b/src/3rdparty/freetype/src/psaux/psauxmod.h
index 1217236924..ae6a8f9383 100644
--- a/src/3rdparty/freetype/src/psaux/psauxmod.h
+++ b/src/3rdparty/freetype/src/psaux/psauxmod.h
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript module implementation (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/3rdparty/freetype/src/psaux/psconv.c b/src/3rdparty/freetype/src/psaux/psconv.c
index 22e8cf2d14..aca741204f 100644
--- a/src/3rdparty/freetype/src/psaux/psconv.c
+++ b/src/3rdparty/freetype/src/psaux/psconv.c
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
-/* Copyright 2006, 2008, 2009, 2012-2013 by */
+/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -489,8 +489,8 @@
if ( c OP 0x80 )
break;
- c = ft_char_table[c & 0x7F];
- if ( (unsigned)c >= 16 )
+ c = (FT_UInt)ft_char_table[c & 0x7F];
+ if ( c >= 16 )
break;
pad = ( pad << 4 ) | c;
diff --git a/src/3rdparty/freetype/src/psaux/psconv.h b/src/3rdparty/freetype/src/psaux/psconv.h
index d91c762210..10f1ff7fb1 100644
--- a/src/3rdparty/freetype/src/psaux/psconv.h
+++ b/src/3rdparty/freetype/src/psaux/psconv.h
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (specification). */
/* */
-/* Copyright 2006, 2012 by */
+/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/3rdparty/freetype/src/psaux/psobjs.c b/src/3rdparty/freetype/src/psaux/psobjs.c
index 7ec3b4cf5f..1d3c7e662c 100644
--- a/src/3rdparty/freetype/src/psaux/psobjs.c
+++ b/src/3rdparty/freetype/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2014 by */
+/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -81,7 +81,7 @@
table->max_elems = count;
table->init = 0xDEADBEEFUL;
table->num_elems = 0;
- table->block = 0;
+ table->block = NULL;
table->capacity = 0;
table->cursor = 0;
@@ -165,10 +165,10 @@
/* reallocation fails. */
/* */
FT_LOCAL_DEF( FT_Error )
- ps_table_add( PS_Table table,
- FT_Int idx,
- void* object,
- FT_PtrDist length )
+ ps_table_add( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_UInt length )
{
if ( idx < 0 || idx >= table->max_elems )
{
@@ -176,12 +176,6 @@
return FT_THROW( Invalid_Argument );
}
- if ( length < 0 )
- {
- FT_ERROR(( "ps_table_add: invalid length\n" ));
- return FT_THROW( Invalid_Argument );
- }
-
/* grow the base block if needed */
if ( table->cursor + length > table->capacity )
{
@@ -600,6 +594,9 @@
error = FT_THROW( Invalid_File_Format );
}
+ if ( cur > limit )
+ cur = limit;
+
parser->error = error;
parser->cursor = cur;
}
@@ -625,8 +622,8 @@
token->type = T1_TOKEN_TYPE_NONE;
- token->start = 0;
- token->limit = 0;
+ token->start = NULL;
+ token->limit = NULL;
/* first of all, skip leading whitespace */
ps_parser_skip_spaces( parser );
@@ -707,7 +704,7 @@
if ( !token->limit )
{
- token->start = 0;
+ token->start = NULL;
token->type = T1_TOKEN_TYPE_NONE;
}
@@ -932,7 +929,7 @@
FT_Memory memory )
{
FT_Byte* cur = *cursor;
- FT_PtrDist len = 0;
+ FT_UInt len = 0;
FT_Int count;
FT_String* result;
FT_Error error;
@@ -972,7 +969,7 @@
}
}
- len = cur - *cursor;
+ len = (FT_UInt)( cur - *cursor );
if ( cur >= limit || FT_ALLOC( result, len + 1 ) )
return 0;
@@ -1230,20 +1227,22 @@
for ( i = 0; i < 4; i++ )
{
- result = ps_tofixedarray( &cur, limit, max_objects,
+ result = ps_tofixedarray( &cur, limit, (FT_Int)max_objects,
temp + i * max_objects, 0 );
if ( result < 0 || (FT_UInt)result < max_objects )
{
FT_ERROR(( "ps_parser_load_field:"
- " expected %d integers in the %s subarray\n"
+ " expected %d integer%s in the %s subarray\n"
" "
" of /FontBBox in the /Blend dictionary\n",
- max_objects,
+ max_objects, max_objects > 1 ? "s" : "",
i == 0 ? "first"
: ( i == 1 ? "second"
: ( i == 2 ? "third"
: "fourth" ) ) ));
error = FT_THROW( Invalid_File_Format );
+
+ FT_FREE( temp );
goto Exit;
}
@@ -1321,7 +1320,7 @@
goto Exit;
}
if ( (FT_UInt)num_elements > field->array_max )
- num_elements = field->array_max;
+ num_elements = (FT_Int)field->array_max;
old_cursor = parser->cursor;
old_limit = parser->limit;
@@ -1379,7 +1378,7 @@
ps_parser_to_bytes( PS_Parser parser,
FT_Byte* bytes,
FT_Offset max_bytes,
- FT_Long* pnum_bytes,
+ FT_ULong* pnum_bytes,
FT_Bool delimiters )
{
FT_Error error = FT_Err_Ok;
@@ -1553,7 +1552,7 @@
FT_GlyphLoader_Rewind( loader );
builder->hints_globals = size->internal;
- builder->hints_funcs = 0;
+ builder->hints_funcs = NULL;
if ( hinting )
builder->hints_funcs = glyph->internal->glyph_hints;
diff --git a/src/3rdparty/freetype/src/psaux/psobjs.h b/src/3rdparty/freetype/src/psaux/psobjs.h
index e380c60dab..bf879c1faf 100644
--- a/src/3rdparty/freetype/src/psaux/psobjs.h
+++ b/src/3rdparty/freetype/src/psaux/psobjs.h
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,10 +52,10 @@ FT_BEGIN_HEADER
FT_Memory memory );
FT_LOCAL( FT_Error )
- ps_table_add( PS_Table table,
- FT_Int idx,
- void* object,
- FT_PtrDist length );
+ ps_table_add( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_UInt length );
FT_LOCAL( void )
ps_table_done( PS_Table table );
@@ -112,7 +112,7 @@ FT_BEGIN_HEADER
ps_parser_to_bytes( PS_Parser parser,
FT_Byte* bytes,
FT_Offset max_bytes,
- FT_Long* pnum_bytes,
+ FT_ULong* pnum_bytes,
FT_Bool delimiters );
diff --git a/src/3rdparty/freetype/src/psaux/rules.mk b/src/3rdparty/freetype/src/psaux/rules.mk
index 7a1be37b69..0d2118c014 100644
--- a/src/3rdparty/freetype/src/psaux/rules.mk
+++ b/src/3rdparty/freetype/src/psaux/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2006 by
+# Copyright 1996-2015 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -20,7 +20,10 @@ PSAUX_DIR := $(SRC_DIR)/psaux
# compilation flags for the driver
#
-PSAUX_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR))
+PSAUX_COMPILE := $(CC) $(ANSIFLAGS) \
+ $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR)) \
+ $(INCLUDE_FLAGS) \
+ $(FT_CFLAGS)
# PSAUX driver sources (i.e., C files)
diff --git a/src/3rdparty/freetype/src/psaux/t1cmap.c b/src/3rdparty/freetype/src/psaux/t1cmap.c
index fb1353ae0f..2e2d433fc4 100644
--- a/src/3rdparty/freetype/src/psaux/t1cmap.c
+++ b/src/3rdparty/freetype/src/psaux/t1cmap.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (body). */
/* */
-/* Copyright 2002, 2003, 2006, 2007, 2012 by */
+/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -39,7 +39,7 @@
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
- cmap->num_glyphs = face->type1.num_glyphs;
+ cmap->num_glyphs = (FT_UInt)face->type1.num_glyphs;
cmap->glyph_names = (const char* const*)face->type1.glyph_names;
cmap->sid_to_string = psnames->adobe_std_strings;
cmap->code_to_sid = is_expert ? psnames->adobe_expert_encoding
@@ -189,8 +189,8 @@
FT_UNUSED( pointer );
- cmap->first = encoding->code_first;
- cmap->count = (FT_UInt)( encoding->code_last - cmap->first );
+ cmap->first = (FT_UInt)encoding->code_first;
+ cmap->count = (FT_UInt)encoding->code_last - cmap->first;
cmap->indices = encoding->char_index;
FT_ASSERT( cmap->indices != NULL );
@@ -295,7 +295,7 @@
return psnames->unicodes_init( memory,
unicodes,
- face->type1.num_glyphs,
+ (FT_UInt)face->type1.num_glyphs,
(PS_GetGlyphNameFunc)&psaux_get_glyph_name,
(PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
diff --git a/src/3rdparty/freetype/src/psaux/t1cmap.h b/src/3rdparty/freetype/src/psaux/t1cmap.h
index 7ae65d2fa1..b8ba06cc3b 100644
--- a/src/3rdparty/freetype/src/psaux/t1cmap.h
+++ b/src/3rdparty/freetype/src/psaux/t1cmap.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (specification). */
/* */
-/* Copyright 2002, 2003, 2006 by */
+/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/3rdparty/freetype/src/psaux/t1decode.c b/src/3rdparty/freetype/src/psaux/t1decode.c
index d67a05ebca..2e199286f6 100644
--- a/src/3rdparty/freetype/src/psaux/t1decode.c
+++ b/src/3rdparty/freetype/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2014 by */
+/* Copyright 2000-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -150,7 +150,7 @@
if ( name &&
name[0] == glyph_name[0] &&
ft_strcmp( name, glyph_name ) == 0 )
- return n;
+ return (FT_Int)n;
}
return -1;
@@ -298,7 +298,7 @@
/* the seac operator must not be nested */
decoder->seac = TRUE;
- error = t1_decoder_parse_glyph( decoder, bchar_index );
+ error = t1_decoder_parse_glyph( decoder, (FT_UInt)bchar_index );
decoder->seac = FALSE;
if ( error )
goto Exit;
@@ -320,7 +320,7 @@
/* the seac operator must not be nested */
decoder->seac = TRUE;
- error = t1_decoder_parse_glyph( decoder, achar_index );
+ error = t1_decoder_parse_glyph( decoder, (FT_UInt)achar_index );
decoder->seac = FALSE;
if ( error )
goto Exit;
@@ -381,10 +381,10 @@
/* compute random seed from stack address of parameter */
- seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed ^
- (FT_PtrDist)(char*)&decoder ^
- (FT_PtrDist)(char*)&charstring_base ) &
- FT_ULONG_MAX ) ;
+ seed = (FT_Fixed)( ( (FT_Offset)(char*)&seed ^
+ (FT_Offset)(char*)&decoder ^
+ (FT_Offset)(char*)&charstring_base ) &
+ FT_ULONG_MAX );
seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
if ( seed == 0 )
seed = 0x7384;
@@ -796,7 +796,8 @@
known_othersubr_result_cnt = 1;
if ( hinter )
- hinter->reset( hinter->hints, builder->current->n_points );
+ hinter->reset( hinter->hints,
+ (FT_UInt)builder->current->n_points );
break;
case 12:
@@ -861,7 +862,7 @@
*values++ = tmp;
}
- known_othersubr_result_cnt = num_points;
+ known_othersubr_result_cnt = (FT_Int)num_points;
break;
}
@@ -879,8 +880,8 @@
idx = Fix2Int( top[0] );
- if ( idx < 0 ||
- idx + blend->num_designs > decoder->len_buildchar )
+ if ( idx < 0 ||
+ (FT_UInt)idx + blend->num_designs > decoder->len_buildchar )
goto Unexpected_OtherSubr;
ft_memcpy( &decoder->buildchar[idx],
@@ -1094,7 +1095,8 @@
/* close hints recording session */
if ( hinter )
{
- if ( hinter->close( hinter->hints, builder->current->n_points ) )
+ if ( hinter->close( hinter->hints,
+ (FT_UInt)builder->current->n_points ) )
goto Syntax_Error;
/* apply hints to the loaded glyph outline now */
@@ -1346,7 +1348,7 @@
FT_TRACE4(( " callsubr" ));
idx = Fix2Int( top[0] );
- if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
+ if ( idx < 0 || idx >= decoder->num_subrs )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
" invalid subrs index\n" ));
@@ -1579,7 +1581,7 @@
/* retrieve PSNames interface from list of current modules */
{
- FT_Service_PsCMaps psnames = 0;
+ FT_Service_PsCMaps psnames;
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
diff --git a/src/3rdparty/freetype/src/psaux/t1decode.h b/src/3rdparty/freetype/src/psaux/t1decode.h
index 00728db501..e83078f719 100644
--- a/src/3rdparty/freetype/src/psaux/t1decode.h
+++ b/src/3rdparty/freetype/src/psaux/t1decode.h
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (specification). */
/* */
-/* Copyright 2000-2001, 2002, 2003 by */
+/* Copyright 2000-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */