/[freetype]/freetype2/src/truetype/ttobjs.c
ViewVC logotype

Diff of /freetype2/src/truetype/ttobjs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.92 by wl, Wed Aug 3 21:17:53 2005 UTC revision 1.93 by olvaffe, Tue Aug 16 01:54:59 2005 UTC
# Line 348  Line 348 
348      if ( size->debug )      if ( size->debug )
349        exec = size->context;        exec = size->context;
350      else      else
351        exec = TT_New_Context( face );        exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;
352    
353      if ( !exec )      if ( !exec )
354        return TT_Err_Could_Not_Find_Context;        return TT_Err_Could_Not_Find_Context;
# Line 403  Line 403 
403      if ( !error )      if ( !error )
404        TT_Save_Context( exec, size );        TT_Save_Context( exec, size );
405    
     if ( !size->debug )  
       TT_Done_Context( exec );  
   
406      return error;      return error;
407    }    }
408    
# Line 436  Line 433 
433      if ( size->debug )      if ( size->debug )
434        exec = size->context;        exec = size->context;
435      else      else
436        exec = TT_New_Context( face );        exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;
437    
438      if ( !exec )      if ( !exec )
439        return TT_Err_Could_Not_Find_Context;        return TT_Err_Could_Not_Find_Context;
# Line 470  Line 467 
467    
468      TT_Save_Context( exec, size );      TT_Save_Context( exec, size );
469    
     if ( !size->debug )  
       TT_Done_Context( exec );  
   
470      return error;      return error;
471    }    }
472    
# Line 917  Line 911 
911    /*    FreeType error code.  0 means success.                             */    /*    FreeType error code.  0 means success.                             */
912    /*                                                                       */    /*                                                                       */
913    FT_LOCAL_DEF( FT_Error )    FT_LOCAL_DEF( FT_Error )
914    tt_driver_init( FT_Module  driver )       /* TT_Driver */    tt_driver_init( FT_Module  ttdriver )     /* TT_Driver */
915    {    {
     FT_Error  error;  
916    
917    #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
918    
919        TT_Driver  driver = (TT_Driver)ttdriver;
920    
     /* set `extra' in glyph loader */  
     error = FT_GlyphLoader_CreateExtra( FT_DRIVER( driver )->glyph_loader );  
921    
922      return error;      if ( !TT_New_Context( driver ) )
923          return TT_Err_Could_Not_Find_Context;
924    
925    #else
926    
927        FT_UNUSED( ttdriver );
928    
929    #endif
930    
931        return TT_Err_Ok;
932    }    }
933    
934    
# Line 950  Line 953 
953      /* destroy the execution context */      /* destroy the execution context */
954      if ( driver->context )      if ( driver->context )
955      {      {
956        TT_Destroy_Context( driver->context, driver->root.root.memory );        TT_Done_Context( driver->context );
957        driver->context = NULL;        driver->context = NULL;
958      }      }
959  #else  #else
# Line 960  Line 963 
963    }    }
964    
965    
966      /*************************************************************************/
967      /*                                                                       */
968      /* <Function>                                                            */
969      /*    tt_slot_init                                                       */
970      /*                                                                       */
971      /* <Description>                                                         */
972      /*    Initializes a new slot object.                                     */
973      /*                                                                       */
974      /* <InOut>                                                               */
975      /*    slot :: A handle to the slot object.                               */
976      /*                                                                       */
977      /* <Return>                                                              */
978      /*    FreeType error code.  0 means success.                             */
979      /*                                                                       */
980      FT_LOCAL_DEF( FT_Error )
981      tt_slot_init( FT_GlyphSlot  slot )
982      {
983        return FT_GlyphLoader_CreateExtra( slot->internal->loader );
984      }
985    
986    
987  /* END */  /* END */

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26