[winfonts] Remove casts. * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and update affected functions. (FNT_Size_Select): Fix number of arguments.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
diff --git a/ChangeLog b/ChangeLog
index b450a5b..f67d886 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-11-30 Werner Lemberg <wl@gnu.org>
+ [winfonts] Remove casts.
+
+ * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and
+ update affected functions.
+ (FNT_Size_Select): Fix number of arguments.
+
+2011-11-30 Werner Lemberg <wl@gnu.org>
+
[type42] Remove casts.
* src/type42/t42driver.c (t42_driver_class): Remove all casts and
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 2d229ab..7a9798a 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -665,8 +665,9 @@
static void
- FNT_Face_Done( FNT_Face face )
+ FNT_Face_Done( FT_Face fntface ) /* FNT_Face */
{
+ FNT_Face face = (FNT_Face)fntface;
FT_Memory memory;
@@ -677,18 +678,19 @@
fnt_font_done( face );
- FT_FREE( face->root.available_sizes );
- face->root.num_fixed_sizes = 0;
+ FT_FREE( fntface->available_sizes );
+ fntface->num_fixed_sizes = 0;
}
static FT_Error
FNT_Face_Init( FT_Stream stream,
- FNT_Face face,
+ FT_Face fntface, /* FNT_Face */
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params )
{
+ FNT_Face face = (FNT_Face)fntface;
FT_Error error;
FT_Memory memory = FT_FACE_MEMORY( face );
@@ -711,7 +713,7 @@
if ( FT_NEW( face->font ) )
goto Exit;
- face->root.num_faces = 1;
+ fntface->num_faces = 1;
font = face->font;
font->offset = 0;
@@ -876,7 +878,7 @@
goto Exit;
Fail:
- FNT_Face_Done( face );
+ FNT_Face_Done( fntface );
Exit:
return error;
@@ -884,11 +886,14 @@
static FT_Error
- FNT_Size_Select( FT_Size size )
+ FNT_Size_Select( FT_Size size,
+ FT_ULong strike_index )
{
FNT_Face face = (FNT_Face)size->face;
FT_WinFNT_Header header = &face->font->header;
+ FT_UNUSED( strike_index );
+
FT_Select_Metrics( size->face, 0 );
@@ -935,7 +940,7 @@
if ( error )
return error;
else
- return FNT_Size_Select( size );
+ return FNT_Size_Select( size, 0 );
}
@@ -1088,10 +1093,10 @@
static FT_Module_Interface
- winfnt_get_service( FT_Driver driver,
+ winfnt_get_service( FT_Module module,
const FT_String* service_id )
{
- FT_UNUSED( driver );
+ FT_UNUSED( module );
return ft_service_list_lookup( winfnt_services, service_id );
}
@@ -1113,34 +1118,34 @@
0,
- (FT_Module_Constructor)0,
- (FT_Module_Destructor) 0,
- (FT_Module_Requester) winfnt_get_service
+ 0, /* FT_Module_Constructor */
+ 0, /* FT_Module_Destructor */
+ winfnt_get_service
},
sizeof ( FNT_FaceRec ),
sizeof ( FT_SizeRec ),
sizeof ( FT_GlyphSlotRec ),
- (FT_Face_InitFunc) FNT_Face_Init,
- (FT_Face_DoneFunc) FNT_Face_Done,
- (FT_Size_InitFunc) 0,
- (FT_Size_DoneFunc) 0,
- (FT_Slot_InitFunc) 0,
- (FT_Slot_DoneFunc) 0,
+ FNT_Face_Init,
+ FNT_Face_Done,
+ 0, /* FT_Size_InitFunc */
+ 0, /* FT_Size_DoneFunc */
+ 0, /* FT_Slot_InitFunc */
+ 0, /* FT_Slot_DoneFunc */
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
- (FT_Slot_LoadFunc) FNT_Load_Glyph,
+ FNT_Load_Glyph,
- (FT_Face_GetKerningFunc) 0,
- (FT_Face_AttachFunc) 0,
- (FT_Face_GetAdvancesFunc) 0,
+ 0, /* FT_Face_GetKerningFunc */
+ 0, /* FT_Face_AttachFunc */
+ 0, /* FT_Face_GetAdvancesFunc */
- (FT_Size_RequestFunc) FNT_Size_Request,
- (FT_Size_SelectFunc) FNT_Size_Select
+ FNT_Size_Request,
+ FNT_Size_Select
};