font.h
Go to the documentation of this file.
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
enum font_name {
FONT_KING8,
FONT_KING10,
FONT_KING14,
FONT_MAX,
};
struct font_s {
uint8_t width;
uint8_t height;
const uint16_t *glyphs;
};
#define FONT_GLYPH_NUMBERS 95
extern const struct font_s fonts[FONT_MAX];
font_s::glyphs
const uint16_t * glyphs
font glyphs: width glyph columns (left to right) times FONT_GLYPH_NUMBERS (MSb is glyph top pixel) ...
Definition: font.h:34
font_name
font_name
list of available font names
Definition: font.h:23
FONT_MAX
number of fonts available
Definition: font.h:27
FONT_KING8
custom 8x5 monospace font
Definition: font.h:24
font_s
font structure containing all properties
Definition: font.h:31
fonts
const struct font_s fonts[FONT_MAX]
list of all available fonts
Definition: font.c:321
font_s::height
uint8_t height
font height in pixels (max 16)
Definition: font.h:33
font_s::width
uint8_t width
font width in pixels
Definition: font.h:32
FONT_KING14
custom 14x9 monospace font
Definition: font.h:26
FONT_KING10
custom 10x6 monospace font
Definition: font.h:25