summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/psaux/cffdecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/psaux/cffdecode.c')
-rw-r--r--src/3rdparty/freetype/src/psaux/cffdecode.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/3rdparty/freetype/src/psaux/cffdecode.c b/src/3rdparty/freetype/src/psaux/cffdecode.c
index 3d2da1e03c..562d17d221 100644
--- a/src/3rdparty/freetype/src/psaux/cffdecode.c
+++ b/src/3rdparty/freetype/src/psaux/cffdecode.c
@@ -4,7 +4,7 @@
*
* PostScript CFF (Type 2) decoding routines (body).
*
- * Copyright (C) 2017-2020 by
+ * Copyright (C) 2017-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -248,7 +248,7 @@
else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
- CFF_Font cff = (CFF_Font)(face->extra.data);
+ CFF_Font cff = (CFF_Font)( face->extra.data );
bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
@@ -1871,7 +1871,7 @@
case cff_op_put:
{
FT_Fixed val = args[0];
- FT_Int idx = (FT_Int)( args[1] >> 16 );
+ FT_UInt idx = (FT_UInt)( args[1] >> 16 );
FT_TRACE4(( " put\n" ));
@@ -1880,20 +1880,20 @@
/* didn't give a hard-coded size limit of the temporary */
/* storage array; instead, an argument of the */
/* `MultipleMaster' operator set the size */
- if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
+ if ( idx < CFF_MAX_TRANS_ELEMENTS )
decoder->buildchar[idx] = val;
}
break;
case cff_op_get:
{
- FT_Int idx = (FT_Int)( args[0] >> 16 );
+ FT_UInt idx = (FT_UInt)( args[0] >> 16 );
FT_Fixed val = 0;
FT_TRACE4(( " get\n" ));
- if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
+ if ( idx < CFF_MAX_TRANS_ELEMENTS )
val = decoder->buildchar[idx];
args[0] = val;
@@ -1914,9 +1914,9 @@
/* this operator was removed from the Type2 specification */
/* in version 16-March-2000 */
{
- FT_Int reg_idx = (FT_Int)args[0];
- FT_Int idx = (FT_Int)args[1];
- FT_Int count = (FT_Int)args[2];
+ FT_UInt reg_idx = (FT_UInt)args[0];
+ FT_UInt idx = (FT_UInt)args[1];
+ FT_UInt count = (FT_UInt)args[2];
FT_TRACE4(( " load\n" ));
@@ -1924,11 +1924,11 @@
/* since we currently don't handle interpolation of multiple */
/* master fonts, we store a vector [1 0 0 ...] in the */
/* temporary storage array regardless of the Registry index */
- if ( reg_idx >= 0 && reg_idx <= 2 &&
- idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS &&
- count >= 0 && count <= num_axes )
+ if ( reg_idx <= 2 &&
+ idx < CFF_MAX_TRANS_ELEMENTS &&
+ count <= num_axes )
{
- FT_Int end, i;
+ FT_UInt end, i;
end = FT_MIN( idx + count, CFF_MAX_TRANS_ELEMENTS );
@@ -2153,7 +2153,7 @@
decoder->locals_bias );
- FT_TRACE4(( " callsubr (idx %d, entering level %d)\n",
+ FT_TRACE4(( " callsubr (idx %d, entering level %td)\n",
idx,
zone - decoder->zones + 1 ));
@@ -2197,7 +2197,7 @@
decoder->globals_bias );
- FT_TRACE4(( " callgsubr (idx %d, entering level %d)\n",
+ FT_TRACE4(( " callgsubr (idx %d, entering level %td)\n",
idx,
zone - decoder->zones + 1 ));
@@ -2236,7 +2236,7 @@
break;
case cff_op_return:
- FT_TRACE4(( " return (leaving level %d)\n",
+ FT_TRACE4(( " return (leaving level %td)\n",
decoder->zone - decoder->zones ));
if ( decoder->zone <= decoder->zones )
@@ -2271,7 +2271,8 @@
} /* while ip < limit */
- FT_TRACE4(( "..end..\n\n" ));
+ FT_TRACE4(( "..end..\n" ));
+ FT_TRACE4(( "\n" ));
Fail:
return error;