DerelictGL



Introduction

DerelictFT is a D binding to the FreeType library. Currently, version 2.2.0 or later is supported.
It is important to understand the pitfalls surrounding the use of the FreeType library, particularly when you use it in commercial projects. Make sure you thoroughly explore the FreeType home page before using the library.
A precompiled FreeType DLL is bundled with DerelictFT for Windows users. All users should be sure to read the accompnaying NOTES.txt in the DerelictFT directory for more information.

Using

  1. Always make sure the DerelictFT source modules are available on your import path.
  2. In modules that make use of DerelictFT, you will need to import the derelict.freetype.ft module.
  3. Before calling any OpenGL functions, you need to make a call to DerelictFT.load(). This will load the shared library.

The following is a complete program that loads DerelictFT:

import derelict.freetype.ft;

void main()
{
	DerelictFT.load();
	
	// now you can call FreeType functions
}

As with other Derelict packages, DerelictFT will throw an exception if an error occurs while loading the shared library. For more information on Derelict exceptions, see the documentation for Loading/Unloading Shared Libraries.

Finally, the method DerelictFT.unload() is provided for convenience. In normal practice you do not need to call this function, as Derelict will unload the library automatically when the app exits. You generally should only use this function if you need to unload DerelictGL while the application is running.

Dependencies

DerelictUtil