12
* FTLibrary class is the global accessor for the Freetype library.
14
* This class encapsulates the Freetype Library. This is a singleton class
15
* and ensures that only one FT_Library is in existence at any one time.
16
* All constructors are private therefore clients cannot create or
17
* instantiate this class themselves and must access it's methods via the
18
* static <code>FTLibrary::Instance()</code> function.
20
* Just because this class returns a valid <code>FTLibrary</code> object
21
* doesn't mean that the Freetype Library has been successfully initialised.
22
* Clients should check for errors. You can initialse the library AND check
23
* for errors using the following code...
24
* <code>err = FTLibrary::Instance().Error();</code>
26
* @see "Freetype 2 Documentation"
29
class FTGL_EXPORT FTLibrary
33
* Global acces point to the single FTLibrary object.
35
* @return The global <code>FTLibrary</code> object.
37
static FTLibrary& Instance();
40
* Gets a pointer to the native Freetype library.
42
* @return A handle to a FreeType library instance.
44
const FT_Library* const GetLibrary() const { return library;}
47
* Queries the library for errors.
49
* @return The current error code.
51
FT_Error Error() const { return err;}
56
* Disposes of the Freetype library
62
* Default constructors.
64
* Made private to stop clients creating there own FTLibrary
68
FTLibrary( const FT_Library&){}
69
FTLibrary& operator=( const FT_Library&) { return *this; }
72
* Initialises the Freetype library
74
* Even though this function indicates success via the return value,
75
* clients can't see this so must check the error codes. This function
76
* is only ever called by the default c_stor
78
* @return <code>true</code> if the Freetype library was
79
* successfully initialised, <code>false</code>
85
* Freetype library handle.
88
// FTC_Manager* manager;
91
* Current error code. Zero means no error.
97
#endif // __FTLibrary__