<p>I need to load some fonts temporarily in my program. Preferably from a dll resource file.</p>

I found
this
with Google. I have cut & pasted the relevant code below.
You need to add the font to your resource file:
```
```
34 FONT "myfont.ttf"
```
```
The following C code will load the font from the DLL resource and release it from memory when you are finished using it.
```
DWORD   Count;
HMODULE Module   = LoadLibrary("mylib.dll");
HRSRC   Resource = FindResource(Module,MAKEINTRESOURCE(34),RT_FONT);
DWORD   Length   = SizeofResource(Module,Resource);
HGLOBAL Address  = LoadResource(Module,Resource);
HANDLE  Handle   = AddFontMemResourceEx(Address,Length,0,&Count);

/* Use the font here... */

RemoveFontMemResourceEx(Handle);
FreeLibrary(Module);
```