WARNING : this is the documentation for an old version of SFML. The documentation for the latest official release is available through the main menu.
WARNING : this is the documentation for an old version of SFML. The documentation for the latest official release is available through the main menu.
Font is the low-level class for loading and manipulating character fonts. More...
#include <Font.hpp>
Classes | |
| struct | Character |
| Defines the drawing attributes of a character. | |
Public Member Functions | |
| Font () | |
| Default constructor. | |
| bool | LoadFromFile (const std::string &Filename, unsigned int CharSize=30, std::wstring Charset=L"") |
| Load the font from a file. | |
| bool | LoadFromMemory (const char *Data, std::size_t SizeInBytes, unsigned int CharSize=30, std::wstring Charset=L"") |
| Load the font from a file in memory. | |
Static Public Member Functions | |
| static const Font & | GetDefaultFont () |
| Get the SFML default built-in font (Arial) | |
Friends | |
| class | String |
Font is the low-level class for loading and manipulating character fonts.
This class is meant to be used by sf::String
| sf::Font::Font | ( | ) |
Default constructor.
| static const Font& sf::Font::GetDefaultFont | ( | ) | [static] |
Get the SFML default built-in font (Arial)
| bool sf::Font::LoadFromFile | ( | const std::string & | Filename, |
| unsigned int | CharSize = 30, |
||
| std::wstring | Charset = L"" |
||
| ) |
Load the font from a file.
| Filename | : Font file to load |
| CharSize | : Size of characters in bitmap - the bigger, the higher quality (30 by default) |
| Charset | : Characters set to generate (empty by default - takes the ASCII range [31, 255]) |
| bool sf::Font::LoadFromMemory | ( | const char * | Data, |
| std::size_t | SizeInBytes, | ||
| unsigned int | CharSize = 30, |
||
| std::wstring | Charset = L"" |
||
| ) |
Load the font from a file in memory.
| Data | : Pointer to the data to load |
| SizeInBytes | : Size of the data, in bytes |
| CharSize | : Size of characters in bitmap - the bigger, the higher quality (30 by default) |
| Charset | : Characters set to generate (empty by default - takes the ASCII range [31, 255]) |