~mrms/unifont2h

35d356ec8e67df9004eccca03fb4af9511911ce9 — Marek Maskarinec 1 year, 5 months ago c29e736
add defines for ascii, latin and cyrililc
2 files changed, 15 insertions(+), 3 deletions(-)

M main.c
M test.c
M main.c => main.c +14 -1
@@ 50,9 50,22 @@ void dosmall(const char *glyph) {

int main(int argc, const char *argv[]) {
	printf(

		"#ifndef UNIFONT_H\n"
		"#define UNIFONT_H\n"

		"#ifdef UNIFONT_ASCII\n"
			"#define UNIFONT_GROUP_0\n"
		"#endif\n"
		"#ifdef UNIFONT_LATIN\n"
			"#define UNIFONT_GROUP_0\n"
			"#define UNIFONT_GROUP_1\n"
			"#define UNIFONT_GROUP_2\n"
		"#endif\n"
		"#ifdef UNIFONT_CYRILLIC\n"
			"#define UNIFONT_GROUP_3\n"
			"#define UNIFONT_GROUP_4\n"
		"#endif\n"

		"#ifdef __\n"
		"static uint16_t __[256][16] = {\n"
	);

M test.c => test.c +1 -2
@@ 1,8 1,7 @@
#include <stdint.h>
#include <stdio.h>

#define UNIFONT_GROUP_0
#define UNIFONT_GROUP_1
#define UNIFONT_LATIN
#include "unifont.h"

static