summaryrefslogtreecommitdiff
path: root/fonts.h
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-29 11:44:24 +0100
committerErich Eckner <git@eckner.net>2018-10-31 21:48:36 +0100
commit36949167f398639f05c3c97cd7b652ce66d35f34 (patch)
tree4745d3c5938739bf2f6c48d0f08f16dad983231b /fonts.h
parenta40eccd30b8294735834149379cfd1538ebe8651 (diff)
downloadanzeige-36949167f398639f05c3c97cd7b652ce66d35f34.tar.xz
fixed width font => variable width font
Diffstat (limited to 'fonts.h')
-rw-r--r--fonts.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fonts.h b/fonts.h
index ae2ce10..b62f33d 100644
--- a/fonts.h
+++ b/fonts.h
@@ -1,8 +1,9 @@
#include <uchar.h>
-#define SYMBOL_WIDTH 5
+#define MAX_SYMBOL_WIDTH 5
+#define SYMBOL_COUNT 104
-static char const symbols[104 * SYMBOL_WIDTH] = {
+static char const symbols[SYMBOL_COUNT * MAX_SYMBOL_WIDTH] = {
0x00,0x00,0x00,0x00,0x00, // space
0x00,0x00,0x2F,0x00,0x00, // !
0x00,0x07,0x00,0x07,0x00, // "
@@ -131,4 +132,7 @@ static char16_t const skip_ranges[10][2] = {
{0xc3b7, 0xc3bb}
};
+static int symbols_boundaries[SYMBOL_COUNT][2];
+
+void init_symbols_boundaries();
int render(char *input, int input_len, char *output, int max_output_len, int skip_unprintables);