aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/cid
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/cid')
-rw-r--r--freetype/src/cid/cidgload.c10
-rw-r--r--freetype/src/cid/cidload.c26
-rw-r--r--freetype/src/cid/cidobjs.c12
-rw-r--r--freetype/src/cid/cidparse.c12
-rw-r--r--freetype/src/cid/cidriver.c17
5 files changed, 36 insertions, 41 deletions
diff --git a/freetype/src/cid/cidgload.c b/freetype/src/cid/cidgload.c
index bd8402340..a1a865869 100644
--- a/freetype/src/cid/cidgload.c
+++ b/freetype/src/cid/cidgload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
+/* Copyright 1996-2007, 2009, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -46,7 +46,7 @@
FT_Byte* p;
FT_UInt fd_select;
FT_Stream stream = face->cid_stream;
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* charstring = 0;
FT_Memory memory = face->root.memory;
FT_ULong glyph_length = 0;
@@ -117,7 +117,7 @@
if ( fd_select >= (FT_UInt)cid->num_dicts )
{
- error = CID_Err_Invalid_Offset;
+ error = FT_THROW( Invalid_Offset );
goto Exit;
}
if ( glyph_length == 0 )
@@ -258,7 +258,7 @@
psaux->t1_decoder_funcs->done( &decoder );
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -284,7 +284,7 @@
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
{
- error = CID_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
diff --git a/freetype/src/cid/cidload.c b/freetype/src/cid/cidload.c
index cbb59850f..f2a18ea51 100644
--- a/freetype/src/cid/cidload.c
+++ b/freetype/src/cid/cidload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (body). */
/* */
-/* Copyright 1996-2006, 2009, 2011-2012 by */
+/* Copyright 1996-2006, 2009, 2011-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -42,7 +42,7 @@
cid_get_offset( FT_Byte* *start,
FT_Byte offsize )
{
- FT_Long result;
+ FT_ULong result;
FT_Byte* p = *start;
@@ -53,7 +53,7 @@
}
*start = p;
- return result;
+ return (FT_Long)result;
}
@@ -114,7 +114,7 @@
{
FT_ERROR(( "cid_load_keyword: invalid use of `%s'\n",
keyword->ident ));
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Exit;
}
@@ -195,7 +195,7 @@
offset->y = temp[5] >> 16;
}
- return CID_Err_Ok; /* this is a callback function; */
+ return FT_Err_Ok; /* this is a callback function; */
/* we must return an error code */
}
@@ -206,7 +206,7 @@
{
CID_FaceInfo cid = &face->cid;
FT_Memory memory = face->root.memory;
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Long num_dicts;
@@ -257,7 +257,7 @@
dict->private_dict.expansion_factor = dict->expansion_factor;
}
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -286,7 +286,7 @@
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = CID_Err_Ok;
+ parser->root.error = FT_Err_Ok;
{
FT_Byte* cur = base;
@@ -416,7 +416,7 @@
/* Check for possible overflow. */
if ( num_subrs == FT_UINT_MAX )
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Fail;
}
@@ -428,7 +428,7 @@
if ( new_max <= max_offsets )
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Fail;
}
@@ -571,7 +571,7 @@
if ( size == 0 )
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Exit;
}
@@ -604,7 +604,7 @@
}
else
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Exit;
}
@@ -624,7 +624,7 @@
p++;
}
- error = CID_Err_Ok;
+ error = FT_Err_Ok;
Exit:
return error;
diff --git a/freetype/src/cid/cidobjs.c b/freetype/src/cid/cidobjs.c
index cc2a2008e..46555e2dc 100644
--- a/freetype/src/cid/cidobjs.c
+++ b/freetype/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
/* */
/* CID objects manager (body). */
/* */
-/* Copyright 1996-2006, 2008, 2010-2011 by */
+/* Copyright 1996-2006, 2008, 2010-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -131,7 +131,7 @@
cid_size_init( FT_Size cidsize ) /* CID_Size */
{
CID_Size size = (CID_Size)cidsize;
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
@@ -169,7 +169,7 @@
size->metrics.y_scale,
0, 0 );
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -302,7 +302,7 @@
if ( !psaux )
{
FT_ERROR(( "cid_face_init: cannot access `psaux' module\n" ));
- error = CID_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -337,7 +337,7 @@
if ( face_index != 0 )
{
FT_ERROR(( "cid_face_init: invalid face index\n" ));
- error = CID_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -466,7 +466,7 @@
{
FT_UNUSED( driver );
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/freetype/src/cid/cidparse.c b/freetype/src/cid/cidparse.c
index 4d21160ce..53df3155d 100644
--- a/freetype/src/cid/cidparse.c
+++ b/freetype/src/cid/cidparse.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2007, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,7 +74,7 @@
"%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
{
FT_TRACE2(( " not a CID-keyed font\n" ));
- error = CID_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
}
FT_FRAME_EXIT();
@@ -99,7 +99,7 @@
if ( stream_len == 0 )
{
FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" ));
- error = CID_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -117,12 +117,12 @@
if ( p[0] == 'S' && ft_strncmp( (char*)p, "StartData", 9 ) == 0 )
{
/* save offset of binary data after `StartData' */
- offset += p - buffer + 10;
+ offset += (FT_ULong)( p - buffer + 10 );
goto Found;
}
else if ( p[1] == 's' && ft_strncmp( (char*)p, "/sfnts", 6 ) == 0 )
{
- offset += p - buffer + 7;
+ offset += (FT_ULong)( p - buffer + 7 );
goto Found;
}
}
@@ -185,7 +185,7 @@
else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 )
{
FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" ));
- error = CID_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
diff --git a/freetype/src/cid/cidriver.c b/freetype/src/cid/cidriver.c
index 694070aab..6132a2776 100644
--- a/freetype/src/cid/cidriver.c
+++ b/freetype/src/cid/cidriver.c
@@ -4,7 +4,7 @@
/* */
/* CID driver interface (body). */
/* */
-/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
+/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,7 +74,7 @@
{
*afont_info = ((CID_Face)face)->cid.font_info;
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
static FT_Error
@@ -83,7 +83,7 @@
{
*afont_extra = ((CID_Face)face)->font_extra;
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
static const FT_Service_PsInfoRec cid_service_ps_info =
@@ -118,7 +118,7 @@
if ( supplement )
*supplement = cid->supplement;
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -126,7 +126,7 @@
cid_get_is_cid( CID_Face face,
FT_Bool *is_cid )
{
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( face );
@@ -142,7 +142,7 @@
FT_UInt glyph_index,
FT_UInt *cid )
{
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( face );
@@ -221,11 +221,6 @@
cid_slot_init,
cid_slot_done,
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
-
cid_slot_load_glyph,
0, /* FT_Face_GetKerningFunc */