This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/extern/bFTGL/src/FTLibrary.cpp
Kent Mein 26f63bfa19 Added bFTGL to extern and updated the Makefiles. I'm guessing there will
need to be tweaks but it seems to work on my linux box.  I haven't
touched any of the other build systems so those will need to be done.

We probably don't need all of this stuff but I figured better to add a little
too much then to little.

Kent
2005-01-21 05:15:33 +00:00

65 lines
898 B
C++
Executable File

#include "FTLibrary.h"
FTLibrary& FTLibrary::Instance()
{
static FTLibrary ftlib;
return ftlib;
}
FTLibrary::~FTLibrary()
{
if( library != 0)
{
FT_Done_FreeType( *library);
delete library;
library= 0;
}
// if( manager != 0)
// {
// FTC_Manager_Done( manager );
//
// delete manager;
// manager= 0;
// }
}
FTLibrary::FTLibrary()
: library(0),
err(0)
{
Initialise();
}
bool FTLibrary::Initialise()
{
if( library != 0)
return true;
library = new FT_Library;
err = FT_Init_FreeType( library);
if( err)
{
delete library;
library = 0;
return false;
}
// FTC_Manager* manager;
//
// if( FTC_Manager_New( lib, 0, 0, 0, my_face_requester, 0, manager )
// {
// delete manager;
// manager= 0;
// return false;
// }
return true;
}