Files
Flipdot-display/src/esp32/logic/builtin_fonts.h
T

27 lines
723 B
C
Raw Normal View History

#pragma once
#include <stddef.h>
#include <stdint.h>
#include "logic/font.h"
// The built-in fonts of the dynamic pages (data in builtin_fonts.cpp, generated by
// tools/make_builtin_fonts.py): "Small" (3x5), "Normal" (5x7, the old clock font),
// "Large" (Normal x 2) and "Full height" (19 dot digits, only 0-9 : . - and space).
struct BuiltinFont
{
const char *name;
const uint8_t *data;
size_t size;
uint8_t scale;
};
extern const BuiltinFont BUILTIN_FONTS[];
extern const int BUILTIN_FONT_COUNT;
#define FONT_NORMAL_NAME "Normal"
// nullptr when there is no built-in font with this name (compared without case)
const BuiltinFont *findBuiltinFont(const char *name);
Font builtinFont(const BuiltinFont &font);