diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2019-11-16 19:33:48 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2019-11-16 19:33:48 -0800 |
commit | 7bbb0fa20ff65a05031886c35646248dc94a38a8 (patch) | |
tree | 264dcd9a8136e99f4bf911c1d403033dd90ed4d8 /src/libs/ascii | |
parent | 14741eaa510d373c1d20f56879a3fbaa786f1a96 (diff) |
libs/ascii: add a basic mono bitmap ascii charset
The rtv module needs to show some captions, so I'm adding a minimal
bitmap ascii text renderer.
Diffstat (limited to 'src/libs/ascii')
-rw-r--r-- | src/libs/ascii/Makefile.am | 3 | ||||
-rw-r--r-- | src/libs/ascii/ascii.c | 1227 | ||||
-rw-r--r-- | src/libs/ascii/ascii.h | 9 |
3 files changed, 1239 insertions, 0 deletions
diff --git a/src/libs/ascii/Makefile.am b/src/libs/ascii/Makefile.am new file mode 100644 index 0000000..41476bb --- /dev/null +++ b/src/libs/ascii/Makefile.am @@ -0,0 +1,3 @@ +noinst_LIBRARIES = libascii.a +libascii_a_SOURCES = ascii.c ascii.h +libascii_a_CPPFLAGS = -I@top_srcdir@/src diff --git a/src/libs/ascii/ascii.c b/src/libs/ascii/ascii.c new file mode 100644 index 0000000..ee3bd0c --- /dev/null +++ b/src/libs/ascii/ascii.c @@ -0,0 +1,1227 @@ +#include "ascii.h" + +const char ascii_chars[256][ASCII_WIDTH * ASCII_HEIGHT] = { + ['!'] = { + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, + ['"'] = { + 0, 1, 0, 1, 0, + 0, 1, 0, 1, 0, + 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0,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0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, + ['{'] = { + 0, 0, 0, 1, 1, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 1, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 1, + }, + ['|'] = { + 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + }, + ['}'] = { + 1, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 1, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 1, 1, 0, 0, 0, + }, + ['~'] = { + 0, 1, 0, 0, 1, + 1, 0, 1, 0, 1, + 1, 0, 0, 1, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, +}; diff --git a/src/libs/ascii/ascii.h b/src/libs/ascii/ascii.h new file mode 100644 index 0000000..6c86898 --- /dev/null +++ b/src/libs/ascii/ascii.h @@ -0,0 +1,9 @@ +#ifndef _ASCII_H +#define _ASCII_H + +#define ASCII_WIDTH 5 +#define ASCII_HEIGHT 11 + +extern const char ascii_chars[256][ASCII_WIDTH * ASCII_HEIGHT]; + +#endif |