tizen 2.3.1 release
[framework/graphics/freetype.git] / src / type42 / t42drivr.c
index 820c679..3ad1bde 100644 (file)
@@ -4,7 +4,8 @@
 /*                                                                         */
 /*    High-level Type 42 driver interface (body).                          */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2006, 2007, 2009 by Roberto Alameda.       */
+/*  Copyright 2002-2004, 2006, 2007, 2009, 2011, 2013 by                   */
+/*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  modified, and distributed under the terms of the FreeType project      */
@@ -63,7 +64,7 @@
   {
     FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
 
-    return T42_Err_Ok;
+    return FT_Err_Ok;
   }
 
 
   t42_get_name_index( T42_Face    face,
                       FT_String*  glyph_name )
   {
-    FT_Int      i;
-    FT_String*  gname;
+    FT_Int  i;
 
 
     for ( i = 0; i < face->type1.num_glyphs; i++ )
     {
-      gname = face->type1.glyph_names[i];
+      FT_String*  gname = face->type1.glyph_names[i];
+
 
       if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
         return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
   {
     *afont_info = ((T42_Face)face)->type1.font_info;
 
-    return T42_Err_Ok;
+    return FT_Err_Ok;
   }
 
 
   {
     *afont_extra = ((T42_Face)face)->type1.font_extra;
 
-    return T42_Err_Ok;
+    return FT_Err_Ok;
   }
 
 
   {
     *afont_private = ((T42_Face)face)->type1.private_dict;
 
-    return T42_Err_Ok;
+    return FT_Err_Ok;
   }
 
 
   static const FT_Service_PsInfoRec  t42_service_ps_info =
   {
     (PS_GetFontInfoFunc)   t42_ps_get_font_info,
-    (PS_GetFontExtraFunc)   t42_ps_get_font_extra,
+    (PS_GetFontExtraFunc)  t42_ps_get_font_extra,
     (PS_HasGlyphNamesFunc) t42_ps_has_glyph_names,
-    (PS_GetFontPrivateFunc)t42_ps_get_font_private
+    (PS_GetFontPrivateFunc)t42_ps_get_font_private,
+    (PS_GetFontValueFunc)  NULL             /* not implemented */
   };
 
 
   };
 
 
-  static FT_Module_Interface
-  T42_Get_Interface( FT_Driver         driver,
+  FT_CALLBACK_DEF( FT_Module_Interface )
+  T42_Get_Interface( FT_Module         module,
                      const FT_String*  t42_interface )
   {
-    FT_UNUSED( driver );
+    FT_UNUSED( module );
 
     return ft_service_list_lookup( t42_services, t42_interface );
   }
 
       0,    /* format interface */
 
-      (FT_Module_Constructor)T42_Driver_Init,
-      (FT_Module_Destructor) T42_Driver_Done,
-      (FT_Module_Requester)  T42_Get_Interface,
+      T42_Driver_Init,
+      T42_Driver_Done,
+      T42_Get_Interface,
     },
 
     sizeof ( T42_FaceRec ),
     sizeof ( T42_SizeRec ),
     sizeof ( T42_GlyphSlotRec ),
 
-    (FT_Face_InitFunc)        T42_Face_Init,
-    (FT_Face_DoneFunc)        T42_Face_Done,
-    (FT_Size_InitFunc)        T42_Size_Init,
-    (FT_Size_DoneFunc)        T42_Size_Done,
-    (FT_Slot_InitFunc)        T42_GlyphSlot_Init,
-    (FT_Slot_DoneFunc)        T42_GlyphSlot_Done,
+    T42_Face_Init,
+    T42_Face_Done,
+    T42_Size_Init,
+    T42_Size_Done,
+    T42_GlyphSlot_Init,
+    T42_GlyphSlot_Done,
 
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-    ft_stub_set_char_sizes,
-    ft_stub_set_pixel_sizes,
-#endif
-    (FT_Slot_LoadFunc)        T42_GlyphSlot_Load,
+    T42_GlyphSlot_Load,
 
-    (FT_Face_GetKerningFunc)  0,
-    (FT_Face_AttachFunc)      0,
+    0,                 /* FT_Face_GetKerningFunc  */
+    0,                 /* FT_Face_AttachFunc      */
 
-    (FT_Face_GetAdvancesFunc) 0,
-    (FT_Size_RequestFunc)     T42_Size_Request,
-    (FT_Size_SelectFunc)      T42_Size_Select
+    0,                 /* FT_Face_GetAdvancesFunc */
+    T42_Size_Request,
+    T42_Size_Select
   };