Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Load TrueType Font From Resource?
Print
Pages: [
1
]
Author
Topic: Load TrueType Font From Resource? (Read 1173 times)
0 Members and 1 Guest are viewing this topic.
lmsmi1
Newbie
Posts: 13
Console Obsession
Load TrueType Font From Resource?
«
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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: Load TrueType Font From Resource?
«
Reply #1 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.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Load TrueType Font From Resource?
anything