The current version of DerelictSDLttf requires SDL_ttf 2.0.7 or later.
make -fwin32.mak DerelictSDLttf DC=DMD
For more information on compiling Derelict libraries, see Building the
Derelict Bindings.
The following is a complete program that loads DerelictSDLttf:
import derelict.sdl.ttf;
void main()
{
DerelictSDLttf.load();
// now you can call SDL_ttf functions
}
As with other Derelict bindings, DerelictSDLttf will throw an exception if an error occurs while loading the shared library. For more information on Derelict exceptions, see the documentation for Using the Derelict Bindings.
Finally, the method DerelictSDLttf.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 DerelictSDLttf while the application is running or if you disable the automatic unloading of shared libraries (as per the documentation for the loader module).