/* 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/>.
 *
 */
/** monospace pixel fonts collection (API)
 *  @file font.h
 *  @author King Kévin <kingkevin@cuvoodoo.info>
 *  @date 2018
 */
#pragma once

/** list of available font names */
enum font_name {
	FONT_KING8, /**< custom 8x5 monospace font */
	FONT_KING10, /**< custom 10x6 monospace font */
	FONT_KING14, /**< custom 14x9 monospace font */
	FONT_MAX, /**< number of fonts available */
};

/** font structure containing all properties */
struct font_s {
	uint8_t width; /**< font width in pixels */
	uint8_t height; /**< font height in pixels (max 16) */
	const uint16_t *glyphs; /**< font glyphs: width glyph columns (left to right) times FONT_GLYPH_NUMBERS (MSb is glyph top pixel) */
};

/** number of available glyphs (starting with ' ' and ending with '~') */
#define FONT_GLYPH_NUMBERS 95

/** list of all available fonts */
extern const struct font_s fonts[FONT_MAX];
