From cffa2eeb2052df70c52fc720add9fe7e31b314e7 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 5 Oct 2006 21:10:32 +0000 Subject: the big UCF-font commit! still a little bit messy, but it works quite well already more to come soon. --- main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 664a3c7..517644a 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,6 @@ /* uuterm, Copyright (C) 2006 Rich Felker; licensed under GNU GPL v2 only */ +#include #include #include #include @@ -8,11 +9,16 @@ #include /* for broken systems */ #include "uuterm.h" +#include "ucf.h" + +int ucf_load(struct ucf *, const char *); +extern const unsigned char vga_ascii_ucf[]; int main(int argc, char *argv[]) { struct uuterm t = { }; struct uudisp d = { }; + struct ucf f = { }; int tty, max; int i, l; unsigned char b[256]; @@ -22,8 +28,13 @@ int main(int argc, char *argv[]) setlocale(LC_CTYPE, ""); + if (ucf_load(&f, getenv("UUTERM_FONT")) < 0 + && ucf_init(&f, vga_ascii_ucf, -1) < 0) + return 1; + d.cell_w = 8; d.cell_h = 16; + d.font = &f; if (uudisp_open(&d) < 0) return 1; -- cgit v1.2.1