Monospaced fonts.
More...
#include <graphics/fonts/font.h>
|
| 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...
|
|
|
const char * | name |
| Name of font.
|
|
const unsigned | width |
| Width of a character.
|
|
const unsigned | height |
| Height of a character.
|
|
Monospaced fonts.
Console fonts are extracted from the Linux kernel (/lib/fonts/).
Font::Font |
( |
const char * |
name, |
|
|
unsigned |
width, |
|
|
unsigned |
height, |
|
|
const unsigned char * |
data |
|
) |
| |
|
inline |
Constructor for a font.
- Parameters
-
name | Name of font |
width | character width |
height | character height |
data | Pointer to bitmap font |
const void * Font::symbol |
( |
unsigned char |
c | ) |
const |
|
inline |
Get bitmap address for a given character.
- Parameters
-
- Returns
- Pointer to bitmap of character
Font * Font::get |
( |
const char * |
name = nullptr , |
|
|
unsigned |
width = 0 , |
|
|
unsigned |
height = 0 |
|
) |
| |
|
static |
Find font.
- Parameters
-
name | Name of font (or nullptr for any) |
width | Width of a character (or 0 for any) |
height | Height of a character (or 0 for any) |
- Returns
- Pointer to font or
nullptr
if no matching font was found
unsigned Font::number |
( |
| ) |
|
|
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