コード例 #1
0
ファイル: ftinit.c プロジェクト: 4nakin/Aquaria_clean
  FT_Init_FreeType( FT_Library  *alibrary )
  {
    FT_Error   error;
    FT_Memory  memory;


    /* First of all, allocate a new system object -- this function is part */
    /* of the system-specific component, i.e. `ftsystem.c'.                */

    memory = FT_New_Memory();
    if ( !memory )
    {
      FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
      return FT_Err_Unimplemented_Feature;
    }

    /* build a library out of it, then fill it with the set of */
    /* default drivers.                                        */

    error = FT_New_Library( memory, alibrary );
    if ( error )
      FT_Done_Memory( memory );
    else
    {
      (*alibrary)->version_major = FREETYPE_MAJOR;
      (*alibrary)->version_minor = FREETYPE_MINOR;
      (*alibrary)->version_patch = FREETYPE_PATCH;

      FT_Add_Default_Modules( *alibrary );
    }

    return error;
  }
コード例 #2
0
ファイル: EAText.cpp プロジェクト: emuikernel/EAWebKit
    FT_Init_FreeType_2(FT_Library* alibrary, FT_MemoryRec_* memoryRec)
    {
        FT_Error   error;
        FT_Memory  memory;

        memory = (FT_Memory)memoryRec->alloc(memoryRec, sizeof(*memory));
        if(memory)
            *memory = *memoryRec;
        else
        {
            //FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
            return FT_Err_Unimplemented_Feature;
        }

        error = FT_New_Library(memory, alibrary);
        if(error)
            FT_Done_Memory(memory);
        else
        {
            (*alibrary)->version_major = FREETYPE_MAJOR;
            (*alibrary)->version_minor = FREETYPE_MINOR;
            (*alibrary)->version_patch = FREETYPE_PATCH;

            FT_Add_Default_Modules(*alibrary);
        }

        return error;
    }
コード例 #3
0
ファイル: ftinit.c プロジェクト: Johnny-Martin/ComBase
  FT_Init_FreeType( FT_Library  *alibrary )
  {
    FT_Error   error;
    FT_Memory  memory;


    /* check of `alibrary' delayed to `FT_New_Library' */

    /* First of all, allocate a new system object -- this function is part */
    /* of the system-specific component, i.e. `ftsystem.c'.                */

    memory = FT_New_Memory();
    if ( !memory )
    {
      FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
      return FT_THROW( Unimplemented_Feature );
    }

    /* build a library out of it, then fill it with the set of */
    /* default drivers.                                        */

    error = FT_New_Library( memory, alibrary );
    if ( error )
      FT_Done_Memory( memory );
    else
      FT_Add_Default_Modules( *alibrary );

    return error;
  }
コード例 #4
0
ファイル: ftinit.c プロジェクト: unidevop/sjtu-project-pipe
FT_Done_FreeType( FT_Library  library )
{
    if ( library )
    {
        FT_Memory  memory = library->memory;


        /* Discard the library object */
        FT_Done_Library( library );

        /* discard memory manager */
        FT_Done_Memory( memory );
    }

    return FT_Err_Ok;
}
コード例 #5
0
ファイル: ftinit.c プロジェクト: Johnny-Martin/ComBase
  FT_Done_FreeType( FT_Library  library )
  {
    FT_Memory  memory;


    if ( !library )
      return FT_THROW( Invalid_Library_Handle );

    memory = library->memory;

    /* Discard the library object */
    FT_Done_Library( library );

    /* discard memory manager */
    FT_Done_Memory( memory );

    return FT_Err_Ok;
  }