(solved) Loading Font From File

Discussion about everything. New games, 3d math, development tips...
Post Reply
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

(solved) Loading Font From File

Post by Acki »

Hi,
I have a Font file and want to create the font without installing it to the system...
I know how to create system fonts (with createFont(...)) but how would I go about loading/creating a (temporary) font from a file ??? :shock:

system: Windows (XPpro)

maybe someone has a clue and can give me a code snippet !?!?! ;)

thx. Acki
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

haha, I got it !!!
it's so easy... :lol:

Code: Select all

// load a font from file
AddFontResource("theFontFile.ttf");

// free memory from the loaded font
RemoveFontResource("theFontFile.ttf");
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply