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; |
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 |
|
|
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; |
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 |
|
|
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 |
|
|
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 |
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 */ |