Monospaced fonts.
More...
#include <font.h>
|
| Font (const char *name, unsigned width, unsigned height, const unsigned char *data) |
| Constructor for a font.
|
|
const void * | symbol (unsigned char c) const |
| Get bitmap address for a given character.
|
|
|
static Font * | get (const char *name=nullptr, unsigned width=0, unsigned height=0) |
| Find font.
|
|
static unsigned | number () |
| Get the number of available fonts.
|
|
|
const char * | name |
| Name of font.
|
|
const unsigned | width |
| Width of a character.
|
|
const unsigned | height |
| Height of a character.
|
|
|
const unsigned char * | data |
| Pointer to bitmap font.
|
|
const size_t | size |
| Size in memory of bitmap font.
|
|
Monospaced fonts.
Console fonts are extracted from the Linux kernel (/lib/fonts/).
◆ Font()
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 |
◆ get()
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
◆ number()
unsigned Font::number |
( |
| ) |
|
|
static |
Get the number of available fonts.
- Returns
- number of fonts
◆ symbol()
const void * Font::symbol |
( |
unsigned char | c | ) |
const |
|
inline |
Get bitmap address for a given character.
- Parameters
-
- Returns
- Pointer to bitmap of character
The documentation for this class was generated from the following files:
- graphics/fonts/font.h
- graphics/fonts/font.cc