Font Class Reference
Monospaced fonts. More...
#include <graphics/fonts/font.h>
Public Member Functions | |
| Font (const char *name, unsigned width, unsigned height, const unsigned char *data) | |
| Constructor for a font. More... | |
| const void * | symbol (unsigned char c) const |
| Get bitmap address for a given character. More... | |
Static Public Member Functions | |
| static Font * | get (const char *name=nullptr, unsigned width=0, unsigned height=0) |
| Find font. More... | |
| static unsigned | number () |
| Get the number of available fonts. More... | |
Public Attributes | |
| const char * | name |
| Name of font. | |
| const unsigned | width |
| Width of a character. | |
| const unsigned | height |
| Height of a character. | |
Detailed Description
Monospaced fonts.
Console fonts are extracted from the Linux kernel (/lib/fonts/).
Constructor & Destructor Documentation
|
inline |
Constructor for a font.
- Parameters
-
name Name of font width character width height character height data Pointer to bitmap font
Member Function Documentation
|
inline |
Get bitmap address for a given character.
- Parameters
-
c character (ASCII)
- Returns
- Pointer to bitmap of character
|
static |
Find font.
- Parameters
-
name Name of font (or nullptrfor any)width Width of a character (or 0for any)height Height of a character (or 0for any)
- Returns
- Pointer to font or
nullptrif no matching font was found
|
static |
Get the number of available fonts.
- Returns
- number of fonts
The documentation for this class was generated from the following files:
- graphics/fonts/font.h
- graphics/fonts/font.cc