IGUIEnvironment::getFont -- loading font from memory

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
eezstreet
Posts: 6
Joined: Wed Feb 13, 2013 3:50 am

IGUIEnvironment::getFont -- loading font from memory

Post by eezstreet »

Hello folks, thank you for your help last time. I am looking for something a bit more particular this time around. My filesystem in my game engine is customized for mod support and different archive types, and it has the ability to read direct from a file and store that into memory. Good for textures and images, since I can put those into Irrlicht with a little bit of conversion. Trouble is, there's no readily apparent way of getting fonts via IGUIEnvironment::getFont using just the memory of the file. Is there a way that I can load the font using just the memory of the font? Thanks.

By the way, I have since put my code up on an SVN repo, and it can be found here:
http://code.google.com/p/irr-baseengine/

Should serve as a small example or some such to beginners, at any rate. :)
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: IGUIEnvironment::getFont -- loading font from memory

Post by hendu »

Yes, this is an API deficiency, it should have an IReadFile alternative (seeing as CGUIFont has one already).

You can either add the method, should be fairly easy, or work around it client-side loading manually a CGUIFont.
eezstreet
Posts: 6
Joined: Wed Feb 13, 2013 3:50 am

Re: IGUIEnvironment::getFont -- loading font from memory

Post by eezstreet »

Thanks for the word on this. I'll likely get working on that tonight. I don't know how I plan to share my source with you guys though, since I feel that others could benefit. I imagine it's a simple method to add though. ^^
Thanks again, always a pleasure.
Post Reply