SFML community forums

Help => Graphics => Topic started by: lmsmi1 on June 26, 2013, 08:10:23 pm

Title: Load TrueType Font From Resource?
Post by: lmsmi1 on June 26, 2013, 08:10:23 pm
Is it possible to embed a TTF (TrueType Font) file in an application (resource file or direct embed) and then load the font from it? I'm looking for the most portable way to do this, but is it even possible?
Title: Re: Load TrueType Font From Resource?
Post by: Laurent on June 26, 2013, 09:07:20 pm
Convert your file to an array of char embedded into a C++ header, then use Font::loadFromMemory to load it into a sf::Font.