Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static FT_Error FT_New_Face_From_Suitcase ( FT_Library  library,
const UInt8 *  pathname,
FT_Long  face_index,
FT_Face aface 
) [static]

Definition at line 793 of file ftmac.c.

Referenced by FT_New_Face_From_Resource().

00797   {
00798     FT_Error       error = FT_Err_Cannot_Open_Resource;
00799     ResFileRefNum  res_ref;
00800     ResourceIndex  res_index;
00801     Handle         fond;
00802     short          num_faces_in_res, num_faces_in_fond;
00803 
00804 
00805     if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )
00806       return FT_Err_Cannot_Open_Resource;
00807 
00808     UseResFile( res_ref );
00809     if ( ResError() )
00810       return FT_Err_Cannot_Open_Resource;
00811 
00812     num_faces_in_res = 0;
00813     for ( res_index = 1; ; ++res_index )
00814     {
00815       fond = Get1IndResource( TTAG_FOND, res_index );
00816       if ( ResError() )
00817         break;
00818 
00819       num_faces_in_fond  = count_faces( fond, pathname );
00820       num_faces_in_res  += num_faces_in_fond;
00821 
00822       if ( 0 <= face_index && face_index < num_faces_in_fond && error )
00823         error = FT_New_Face_From_FOND( library, fond, face_index, aface );
00824 
00825       face_index -= num_faces_in_fond;
00826     }
00827 
00828     CloseResFile( res_ref );
00829     if ( FT_Err_Ok == error && NULL != aface && NULL != *aface )
00830       (*aface)->num_faces = num_faces_in_res;
00831     return error;
00832   }


Generated on Thu Feb 9 06:09:58 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.