![]() |
Gamedev Framework (gf)
0.12.0
A C++14 framework for 2D games
|
A bitmap console font. More...
#include <gf/ConsoleFont.h>

Public Member Functions | |
| virtual const BareTexture * | getTexture () const override |
| Get the texture of the console font. More... | |
| bool | loadFromFile (const Path &filename, ConsoleFontFormat format, Vector2u size={ 0u, 0u }) |
| Load a console font from a file. More... | |
Public Member Functions inherited from gf::ConsoleFont | |
| ConsoleFont () | |
| Constructor. More... | |
| virtual | ~ConsoleFont () |
| Destructor. More... | |
| ConsoleFontFormat | getFormat () const |
| Get the format of the font. More... | |
| Vector2u | getSize () const |
| Get the size of the fonts. More... | |
| Vector2u | getCharacterSize () const |
| Get the size of the characters. More... | |
| void | mapCode (char16_t c, Vector2u position) |
| Map a character to a position in the font. More... | |
| void | mapCodeRange (char16_t c, unsigned count, Vector2u position) |
| Map a range of characters to consecutive positions in the font. More... | |
| void | mapString (StringRef str, Vector2u position) |
| Map characters from a string to consecutive positions in the font. More... | |
| void | mapElement (ConsoleFontElement element) |
| Map an element in the font. More... | |
| void | mapElements (ArrayRef< ConsoleFontElement > elements) |
| Map some elements in the font. More... | |
| void | clearMapping () |
| Clear the mapping. More... | |
| RectU | getSubTexture (char16_t c) const |
| Get the sub-texture rectangle. More... | |
| RectF | getTextureRect (char16_t c) const |
| Get the texture rectangle for a character. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from gf::ConsoleFont | |
| bool | setFormatAndComputeSizes (ConsoleFontFormat format, Vector2u size, Vector2u imageSize) |
| Set the format of the font. More... | |
| void | logFormat (const Path &filename) const |
| Print the format of the font. More... | |
| Vector2u | getColorKeyPosition () const |
| Get the color key position. More... | |
A bitmap console font.
This class is based on libtcod console font handling. It supports bitmap fonts provided by libtcod.
|
overridevirtual |
| bool gf::BitmapConsoleFont::loadFromFile | ( | const Path & | filename, |
| ConsoleFontFormat | format, | ||
| Vector2u | size = { 0u, 0u } |
||
| ) |
Load a console font from a file.
| filename | The name of the file |
| format | The format of the font |
| size | The size, in characters, of the font |
1.8.13