[Scummvm-cvs-logs] scummvm master -> 08b6f28d5476505ce62748f691e861fd7f9dd3e4

lordhoto lordhoto at gmail.com
Fri Jan 6 15:40:23 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
08b6f28d54 GRAPHICS: Rework BDF font code.


Commit: 08b6f28d5476505ce62748f691e861fd7f9dd3e4
    https://github.com/scummvm/scummvm/commit/08b6f28d5476505ce62748f691e861fd7f9dd3e4
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-01-06T06:38:29-08:00

Commit Message:
GRAPHICS: Rework BDF font code.

Changed paths:
  A devtools/convbdf.cpp
  R devtools/convbdf.c
    devtools/module.mk
    graphics/fonts/bdf.cpp
    graphics/fonts/bdf.h
    graphics/fonts/consolefont.cpp
    graphics/fonts/newfont.cpp
    graphics/fonts/newfont_big.cpp
    gui/ThemeEngine.h
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/THEMERC
    gui/themes/scummclassic/clR6x12-iso-8859-2.fcc
    gui/themes/scummclassic/clR6x12-iso-8859-5.fcc
    gui/themes/scummclassic/fixed5x8-iso-8859-2.fcc
    gui/themes/scummclassic/fixed5x8-iso-8859-5.fcc
    gui/themes/scummclassic/helvb12-iso-8859-2.fcc
    gui/themes/scummclassic/helvb12-iso-8859-5.fcc
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/THEMERC
    gui/themes/scummmodern/clR6x12-iso-8859-2.fcc
    gui/themes/scummmodern/clR6x12-iso-8859-5.fcc
    gui/themes/scummmodern/fixed5x8-iso-8859-2.fcc
    gui/themes/scummmodern/fixed5x8-iso-8859-5.fcc
    gui/themes/scummmodern/helvb12-iso-8859-1.fcc
    gui/themes/scummmodern/helvb12-iso-8859-2.fcc
    gui/themes/scummmodern/helvb12-iso-8859-5.fcc



diff --git a/devtools/convbdf.c b/devtools/convbdf.c
deleted file mode 100644
index e465b77..0000000
--- a/devtools/convbdf.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- * Convert BDF files to C++ source.
- *
- * Copyright (c) 2002 by Greg Haerr <greg at censoft.com>
- *
- * Originally writen for the Microwindows Project <http://microwindows.org>
- *
- * Greg then modified it for Rockbox <http://rockbox.haxx.se/>
- *
- * Max Horn took that version and changed it to work for ScummVM.
- * Changes include: warning fixes, removed .FNT output, output C++ source,
- * tweak code generator so that the generated code fits into ScummVM code base.
- *
- * What fun it is converting font data...
- *
- * 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 2
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-int READ_UINT16(void *addr) {
-	unsigned char *buf = (unsigned char *)addr;
-	return (buf[0] << 8) | buf[1];
-}
-
-void WRITE_UINT16(void *addr, int value) {
-	unsigned char *buf = (unsigned char *)addr;
-	buf[0] = (value >> 8) & 0xFF;
-	buf[1] = value & 0xFF;
-}
-
-/* BEGIN font.h*/
-/* bitmap_t helper macros*/
-#define BITMAP_WORDS(x)			(((x)+15)/16)	/* image size in words*/
-#define BITMAP_BYTES(x)			(BITMAP_WORDS(x)*sizeof(bitmap_t))
-#define BITMAP_BITSPERIMAGE		(sizeof(bitmap_t) * 8)
-#define BITMAP_BITVALUE(n)		((bitmap_t) (((bitmap_t) 1) << (n)))
-#define BITMAP_FIRSTBIT			(BITMAP_BITVALUE(BITMAP_BITSPERIMAGE - 1))
-#define BITMAP_TESTBIT(m)	((m) & BITMAP_FIRSTBIT)
-#define BITMAP_SHIFTBIT(m)	((bitmap_t) ((m) << 1))
-
-typedef unsigned short bitmap_t; /* bitmap image unit size*/
-
-typedef struct {
-	signed char w;
-	signed char h;
-	signed char x;
-	signed char y;
-} BBX;
-
-/* builtin C-based proportional/fixed font structure */
-/* based on The Microwindows Project http://microwindows.org */
-struct font {
-	char *	name;		/* font name*/
-	int		maxwidth;	/* max width in pixels*/
-	int		height;		/* height in pixels*/
-	int	fbbw, fbbh, fbbx, fbby;	/* max bounding box */
-	int		ascent;		/* ascent (baseline) height*/
-	int		firstchar;	/* first character in bitmap*/
-	int		size;		/* font size in glyphs*/
-	bitmap_t*	bits;		/* 16-bit right-padded bitmap data*/
-	unsigned long* offset;	/* offsets into bitmap data*/
-	unsigned char* width;	/* character widths or NULL if fixed*/
-	BBX*	bbx;		/* character bounding box or NULL if fixed*/
-	int		defaultchar;	/* default char (not glyph index)*/
-	long	bits_size;	/* # words of bitmap_t bits*/
-
-	/* unused by runtime system, read in by convbdf*/
-	char *	facename;	/* facename of font*/
-	char *	copyright;	/* copyright info for loadable fonts*/
-	int		pixel_size;
-	int		descent;
-};
-/* END font.h*/
-
-#define isprefix(buf,str)	(!strncmp(buf, str, strlen(str)))
-#define strequal(s1,s2)		(!strcmp(s1, s2))
-
-#define EXTRA	300		/* # bytes extra allocation for buggy .bdf files*/
-
-int gen_map = 1;
-int start_char = 0;
-int limit_char = 65535;
-int oflag = 0;
-char outfile[256];
-
-void usage(void);
-void getopts(int *pac, char ***pav);
-int convbdf(char *path);
-
-void free_font(struct font* pf);
-struct font* bdf_read_font(char *path);
-int bdf_read_header(FILE *fp, struct font* pf);
-int bdf_read_bitmaps(FILE *fp, struct font* pf);
-char * bdf_getline(FILE *fp, char *buf, int len);
-bitmap_t bdf_hexval(unsigned char *buf);
-
-int gen_c_source(struct font* pf, char *path);
-
-void error(const char *s, ...) {
-	char buf[1024];
-	va_list va;
-
-	va_start(va, s);
-	vsnprintf(buf, 1024, s, va);
-	va_end(va);
-
-	fprintf(stderr, "ERROR: %s!\n", buf);
-
-	exit(1);
-}
-
-void warning(const char *s, ...) {
-	char buf[1024];
-	va_list va;
-
-	va_start(va, s);
-	vsnprintf(buf, 1024, s, va);
-	va_end(va);
-
-	fprintf(stderr, "WARNING: %s!\n", buf);
-}
-
-void
-usage(void) {
-	char help[] = {
-	"Usage: convbdf [options] [input-files]\n"
-	"		convbdf [options] [-o output-file] [single-input-file]\n"
-	"Options:\n"
-	"	 -s N	Start output at character encodings >= N\n"
-	"	 -l N	Limit output to character encodings <= N\n"
-	"	 -n		Don't generate bitmaps as comments in .c file\n"
-	};
-
-	fprintf(stderr, "%s", help);
-}
-
-/* parse command line options*/
-void getopts(int *pac, char ***pav) {
-	const char *p;
-	char **av;
-	int ac;
-
-	ac = *pac;
-	av = *pav;
-	while (ac > 0 && av[0][0] == '-') {
-		p = &av[0][1];
-		while (*p) {
-			switch (*p++) {
-			case ' ':			/* multiple -args on av[]*/
-				while (*p && *p == ' ')
-					p++;
-				if (*p++ != '-')	/* next option must have dash*/
-					p = "";
-				break;			/* proceed to next option*/
-			case 'n':			/* don't gen bitmap comments*/
-				gen_map = 0;
-				break;
-			case 'o':			/* set output file*/
-				oflag = 1;
-				if (*p) {
-					strcpy(outfile, p);
-					while (*p && *p != ' ')
-						p++;
-				}
-				else {
-					av++; ac--;
-					if (ac > 0)
-						strcpy(outfile, av[0]);
-				}
-				break;
-			case 'l':			/* set encoding limit*/
-				if (*p) {
-					limit_char = atoi(p);
-					while (*p && *p != ' ')
-						p++;
-				}
-				else {
-					av++; ac--;
-					if (ac > 0)
-						limit_char = atoi(av[0]);
-				}
-				break;
-			case 's':			/* set encoding start*/
-				if (*p) {
-					start_char = atoi(p);
-					while (*p && *p != ' ')
-						p++;
-				}
-				else {
-					av++; ac--;
-					if (ac > 0)
-						start_char = atoi(av[0]);
-				}
-				break;
-			default:
-				fprintf(stderr, "Unknown option ignored: %c\r\n", *(p-1));
-			}
-		}
-		++av; --ac;
-	}
-	*pac = ac;
-	*pav = av;
-}
-
-/* remove directory prefix and file suffix from full path*/
-char *basename(char *path) {
-	char *p, *b;
-	static char base[256];
-
-	/* remove prepended path and extension*/
-	b = path;
-	for (p = path; *p; ++p) {
-		if (*p == '/')
-			b = p + 1;
-	}
-	strcpy(base, b);
-	for (p = base; *p; ++p) {
-		if (*p == '.') {
-			*p = 0;
-			break;
-		}
-	}
-	return base;
-}
-
-int convbdf(char *path) {
-	struct font* pf;
-	int ret = 0;
-
-	pf = bdf_read_font(path);
-	if (!pf)
-		exit(1);
-
-	if (!oflag) {
-		strcpy(outfile, basename(path));
-		strcat(outfile, ".cpp");
-	}
-	ret |= gen_c_source(pf, outfile);
-
-	free_font(pf);
-	return ret;
-}
-
-int main(int ac, char *av[]) {
-	int ret = 0;
-
-	++av; --ac;		/* skip av[0]*/
-	getopts(&ac, &av);	/* read command line options*/
-
-	if (ac < 1) {
-		usage();
-		exit(1);
-	}
-	if (oflag && ac > 1) {
-		usage();
-		exit(1);
-	}
-
-	while (ac > 0) {
-		ret |= convbdf(av[0]);
-		++av; --ac;
-	}
-
-	exit(ret);
-}
-
-/* free font structure*/
-void free_font(struct font* pf) {
-	if (!pf)
-		return;
-	free(pf->name);
-	free(pf->facename);
-	free(pf->bits);
-	free(pf->offset);
-	free(pf->width);
-	free(pf);
-}
-
-/* build incore structure from .bdf file*/
-struct font* bdf_read_font(char *path) {
-	FILE *fp;
-	struct font* pf;
-
-	fp = fopen(path, "rb");
-	if (!fp) {
-		fprintf(stderr, "Error opening file: %s\n", path);
-		return NULL;
-	}
-
-	pf = (struct font*)calloc(1, sizeof(struct font));
-	if (!pf)
-		goto errout;
-
-	pf->name = strdup(basename(path));
-
-	if (!bdf_read_header(fp, pf)) {
-		fprintf(stderr, "Error reading font header\n");
-		goto errout;
-	}
-
-	if (!bdf_read_bitmaps(fp, pf)) {
-		fprintf(stderr, "Error reading font bitmaps\n");
-		goto errout;
-	}
-
-	fclose(fp);
-	return pf;
-
- errout:
-	fclose(fp);
-	free_font(pf);
-	return NULL;
-}
-
-/* read bdf font header information, return 0 on error*/
-int bdf_read_header(FILE *fp, struct font* pf) {
-	int encoding;
-	int nchars, maxwidth;
-	int firstchar = 65535;
-	int lastchar = -1;
-	char buf[256];
-	char facename[256];
-	char copyright[256];
-
-	/* set certain values to errors for later error checking*/
-	pf->defaultchar = -1;
-	pf->ascent = -1;
-	pf->descent = -1;
-
-	for (;;) {
-		if (!bdf_getline(fp, buf, sizeof(buf))) {
-			fprintf(stderr, "Error: EOF on file\n");
-			return 0;
-		}
-		if (isprefix(buf, "FONT ")) {		/* not required*/
-			if (sscanf(buf, "FONT %[^\n]", facename) != 1) {
-				fprintf(stderr, "Error: bad 'FONT'\n");
-				return 0;
-			}
-			pf->facename = strdup(facename);
-			continue;
-		}
-		if (isprefix(buf, "COPYRIGHT ")) {	/* not required*/
-			if (sscanf(buf, "COPYRIGHT \"%[^\"]", copyright) != 1) {
-				fprintf(stderr, "Error: bad 'COPYRIGHT'\n");
-				return 0;
-			}
-			pf->copyright = strdup(copyright);
-			continue;
-		}
-		if (isprefix(buf, "DEFAULT_CHAR ")) {	/* not required*/
-			if (sscanf(buf, "DEFAULT_CHAR %d", &pf->defaultchar) != 1) {
-				fprintf(stderr, "Error: bad 'DEFAULT_CHAR'\n");
-				return 0;
-			}
-		}
-		if (isprefix(buf, "FONT_DESCENT ")) {
-			if (sscanf(buf, "FONT_DESCENT %d", &pf->descent) != 1) {
-				fprintf(stderr, "Error: bad 'FONT_DESCENT'\n");
-				return 0;
-			}
-			continue;
-		}
-		if (isprefix(buf, "FONT_ASCENT ")) {
-			if (sscanf(buf, "FONT_ASCENT %d", &pf->ascent) != 1) {
-				fprintf(stderr, "Error: bad 'FONT_ASCENT'\n");
-				return 0;
-			}
-			continue;
-		}
-		if (isprefix(buf, "FONTBOUNDINGBOX ")) {
-			if (sscanf(buf, "FONTBOUNDINGBOX %d %d %d %d",
-					   &pf->fbbw, &pf->fbbh, &pf->fbbx, &pf->fbby) != 4) {
-				fprintf(stderr, "Error: bad 'FONTBOUNDINGBOX'\n");
-				return 0;
-			}
-			continue;
-		}
-		if (isprefix(buf, "CHARS ")) {
-			if (sscanf(buf, "CHARS %d", &nchars) != 1) {
-				fprintf(stderr, "Error: bad 'CHARS'\n");
-				return 0;
-			}
-			continue;
-		}
-
-		/*
-		 * Reading ENCODING is necessary to get firstchar/lastchar
-		 * which is needed to pre-calculate our offset and widths
-		 * array sizes.
-		 */
-		if (isprefix(buf, "ENCODING ")) {
-			if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
-				fprintf(stderr, "Error: bad 'ENCODING'\n");
-				return 0;
-			}
-			if (encoding >= 0 &&
-				encoding <= limit_char &&
-				encoding >= start_char) {
-
-				if (firstchar > encoding)
-					firstchar = encoding;
-				if (lastchar < encoding)
-					lastchar = encoding;
-			}
-			continue;
-		}
-		if (strequal(buf, "ENDFONT"))
-			break;
-	}
-
-	/* calc font height*/
-	if (pf->ascent < 0 || pf->descent < 0 || firstchar < 0) {
-		fprintf(stderr, "Error: Invalid BDF file, requires FONT_ASCENT/FONT_DESCENT/ENCODING\n");
-		return 0;
-	}
-	pf->height = pf->ascent + pf->descent;
-
-	/* calc default char*/
-	if (pf->defaultchar < 0 ||
-		pf->defaultchar < firstchar ||
-		pf->defaultchar > limit_char )
-		pf->defaultchar = firstchar;
-
-	/* calc font size (offset/width entries)*/
-	pf->firstchar = firstchar;
-	pf->size = lastchar - firstchar + 1;
-
-	/* use the font boundingbox to get initial maxwidth*/
-	/*maxwidth = pf->fbbw - pf->fbbx;*/
-	maxwidth = pf->fbbw;
-
-	/* initially use font maxwidth * height for bits allocation*/
-	pf->bits_size = nchars * BITMAP_WORDS(maxwidth) * pf->height;
-
-	/* allocate bits, offset, and width arrays*/
-	pf->bits = (bitmap_t *)malloc(pf->bits_size * sizeof(bitmap_t) + EXTRA);
-	pf->offset = (unsigned long *)malloc(pf->size * sizeof(unsigned long));
-	pf->width = (unsigned char *)malloc(pf->size * sizeof(unsigned char));
-	pf->bbx = (BBX *)malloc(pf->size * sizeof(BBX));
-
-	if (!pf->bits || !pf->offset || !pf->width) {
-		fprintf(stderr, "Error: no memory for font load\n");
-		return 0;
-	}
-
-	return 1;
-}
-
-/* read bdf font bitmaps, return 0 on error*/
-int bdf_read_bitmaps(FILE *fp, struct font* pf) {
-	long ofs = 0;
-	int maxwidth = 0;
-	int i, k, encoding, width;
-	int bbw, bbh, bbx, bby;
-	int proportional = 0;
-	int need_bbx = 0;
-	int encodetable = 0;
-	long l;
-	char buf[256];
-
-	/* reset file pointer*/
-	fseek(fp, 0L, SEEK_SET);
-
-	/* initially mark offsets as not used*/
-	for (i = 0; i < pf->size; ++i)
-		pf->offset[i] = -1;
-
-	for (;;) {
-		if (!bdf_getline(fp, buf, sizeof(buf))) {
-			fprintf(stderr, "Error: EOF on file\n");
-			return 0;
-		}
-		if (isprefix(buf, "STARTCHAR")) {
-			encoding = width = bbw = bbh = bbx = bby = -1;
-			continue;
-		}
-		if (isprefix(buf, "ENCODING ")) {
-			if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
-				fprintf(stderr, "Error: bad 'ENCODING'\n");
-				return 0;
-			}
-			if (encoding < start_char || encoding > limit_char)
-				encoding = -1;
-			continue;
-		}
-		if (isprefix(buf, "DWIDTH ")) {
-			if (sscanf(buf, "DWIDTH %d", &width) != 1) {
-				fprintf(stderr, "Error: bad 'DWIDTH'\n");
-				return 0;
-			}
-			/* use font boundingbox width if DWIDTH <= 0*/
-			if (width <= 0)
-				width = pf->fbbw - pf->fbbx;
-			continue;
-		}
-		if (isprefix(buf, "BBX ")) {
-			if (sscanf(buf, "BBX %d %d %d %d", &bbw, &bbh, &bbx, &bby) != 4) {
-				fprintf(stderr, "Error: bad 'BBX'\n");
-				return 0;
-			}
-			continue;
-		}
-		if (strequal(buf, "BITMAP")) {
-			bitmap_t *ch_bitmap = pf->bits + ofs;
-			int ch_words;
-
-			if (encoding < 0)
-				continue;
-
-			/* set bits offset in encode map*/
-			if (pf->offset[encoding-pf->firstchar] != (unsigned long)-1) {
-				fprintf(stderr, "Error: duplicate encoding for character %d (0x%02x), ignoring duplicate\n",
-						encoding, encoding);
-				continue;
-			}
-			pf->offset[encoding-pf->firstchar] = ofs;
-			pf->width[encoding-pf->firstchar] = width;
-
-			pf->bbx[encoding-pf->firstchar].w = bbw;
-			pf->bbx[encoding-pf->firstchar].h = bbh;
-			pf->bbx[encoding-pf->firstchar].x = bbx;
-			pf->bbx[encoding-pf->firstchar].y = bby;
-
-			if (width > maxwidth)
-				maxwidth = width;
-
-			/* clear bitmap*/
-			memset(ch_bitmap, 0, BITMAP_BYTES(bbw) * bbh);
-
-			ch_words = BITMAP_WORDS(bbw);
-
-			/* read bitmaps*/
-			for (i = 0; i < bbh; ++i) {
-				if (!bdf_getline(fp, buf, sizeof(buf))) {
-					fprintf(stderr, "Error: EOF reading BITMAP data\n");
-					return 0;
-				}
-				if (isprefix(buf, "ENDCHAR"))
-					break;
-
-				for (k = 0; k < ch_words; ++k) {
-					bitmap_t value;
-
-					value = bdf_hexval((unsigned char *)buf);
-
-					if (bbw > 8) {
-						WRITE_UINT16(ch_bitmap, value);
-					} else {
-						WRITE_UINT16(ch_bitmap, value << 8);
-					}
-					ch_bitmap++;
-				}
-			}
-
-			// If the default glyph is completely empty, the next
-			// glyph will not be dumped. Work around this by
-			// never generating completely empty glyphs.
-
-			if (bbh == 0 && bbw == 0) {
-				pf->bbx[encoding-pf->firstchar].w = 1;
-				pf->bbx[encoding-pf->firstchar].h = 1;
-				*ch_bitmap++ = 0;
-				ofs++;
-			} else {
-				ofs += ch_words * bbh;
-			}
-			continue;
-		}
-		if (strequal(buf, "ENDFONT"))
-			break;
-	}
-
-	/* set max width*/
-	pf->maxwidth = maxwidth;
-
-	/* change unused offset/width values to default char values*/
-	for (i = 0; i < pf->size; ++i) {
-		int defchar = pf->defaultchar - pf->firstchar;
-
-		if (pf->offset[i] == (unsigned long)-1) {
-			pf->offset[i] = pf->offset[defchar];
-			pf->width[i] = pf->width[defchar];
-			pf->bbx[i].w = pf->bbx[defchar].w;
-			pf->bbx[i].h = pf->bbx[defchar].h;
-			pf->bbx[i].x = pf->bbx[defchar].x;
-			pf->bbx[i].y = pf->bbx[defchar].y;
-		}
-	}
-
-	/* determine whether font doesn't require encode table*/
-	l = 0;
-	for (i = 0; i < pf->size; ++i) {
-		if (pf->offset[i] != (unsigned long)l) {
-			encodetable = 1;
-			break;
-		}
-		l += BITMAP_WORDS(pf->bbx[i].w) * pf->bbx[i].h;
-	}
-	if (!encodetable) {
-		free(pf->offset);
-		pf->offset = NULL;
-	}
-
-	/* determine whether font is fixed-width*/
-	for (i = 0; i < pf->size; ++i) {
-		if (pf->width[i] != maxwidth) {
-			proportional = 1;
-			break;
-		}
-	}
-	if (!proportional) {
-		free(pf->width);
-		pf->width = NULL;
-	}
-
-	/* determine if the font needs a bbx table */
-	for (i = 0; i < pf->size; ++i) {
-		if (pf->bbx[i].w != pf->fbbw || pf->bbx[i].h != pf->fbbh || pf->bbx[i].x != pf->fbbx || pf->bbx[i].y != pf->fbby) {
-			need_bbx = 1;
-			break;
-		}
-	}
-	if (!need_bbx) {
-		free(pf->bbx);
-		pf->bbx = NULL;
-	}
-
-	/* reallocate bits array to actual bits used*/
-	if (ofs < pf->bits_size) {
-		pf->bits = (bitmap_t *)realloc(pf->bits, ofs * sizeof(bitmap_t));
-		pf->bits_size = ofs;
-	}
-	else {
-		if (ofs > pf->bits_size) {
-			fprintf(stderr, "Warning: DWIDTH spec > max FONTBOUNDINGBOX\n");
-			if (ofs > pf->bits_size+EXTRA) {
-				fprintf(stderr, "Error: Not enough bits initially allocated\n");
-				return 0;
-			}
-			pf->bits_size = ofs;
-		}
-	}
-
-	return 1;
-}
-
-/* read the next non-comment line, returns buf or NULL if EOF*/
-char *bdf_getline(FILE *fp, char *buf, int len) {
-	int c;
-	char *b;
-
-	for (;;) {
-		b = buf;
-		while ((c = getc(fp)) != EOF) {
-			if (c == '\r')
-				continue;
-			if (c == '\n')
-				break;
-			if (b - buf >= (len - 1))
-				break;
-			*b++ = c;
-		}
-		*b = '\0';
-		if (c == EOF && b == buf)
-			return NULL;
-		if (b != buf && !isprefix(buf, "COMMENT"))
-			break;
-	}
-	return buf;
-}
-
-/* return hex value of buffer */
-bitmap_t bdf_hexval(unsigned char *buf) {
-	bitmap_t val = 0;
-	unsigned char *ptr;
-
-	for (ptr = buf; *ptr; ptr++) {
-		int c = *ptr;
-
-		if (c >= '0' && c <= '9')
-			c -= '0';
-		else if (c >= 'A' && c <= 'F')
-			c = c - 'A' + 10;
-		else if (c >= 'a' && c <= 'f')
-			c = c - 'a' + 10;
-		else
-			c = 0;
-		val = (val << 4) | c;
-	}
-	return val;
-}
-
-/* generate C source from in-core font*/
-int gen_c_source(struct font* pf, char *path) {
-	FILE *ofp;
-	int h, i;
-	int did_defaultchar = 0;
-	int did_syncmsg = 0;
-	time_t t = time(0);
-	bitmap_t *ofs = pf->bits;
-	char buf[256];
-	char obuf[256];
-	char bbuf[256];
-	char hdr1[] = {
-		"/* Generated by convbdf on %s. */\n"
-		"#include \"graphics/fonts/bdf.h\"\n"
-		"\n"
-		"/* Font information:\n"
-		"   name: %s\n"
-		"   facename: %s\n"
-		"   w x h: %dx%d\n"
-		"   bbx: %d %d %d %d\n"
-		"   size: %d\n"
-		"   ascent: %d\n"
-		"   descent: %d\n"
-		"   first char: %d (0x%02x)\n"
-		"   last char: %d (0x%02x)\n"
-		"   default char: %d (0x%02x)\n"
-		"   proportional: %s\n"
-		"   %s\n"
-		"*/\n"
-		"\n"
-		"namespace Graphics {\n"
-		"\n"
-		"/* Font character bitmap data. */\n"
-		"static const bitmap_t _font_bits[] = {\n"
-	};
-
-	ofp = fopen(path, "w");
-	if (!ofp) {
-		fprintf(stderr, "Can't create %s\n", path);
-		return 1;
-	}
-
-	strcpy(buf, ctime(&t));
-	buf[strlen(buf) - 1] = 0;
-
-	fprintf(ofp, hdr1, buf,
-			pf->name,
-			pf->facename? pf->facename: "",
-			pf->maxwidth, pf->height,
-			pf->fbbw, pf->fbbh, pf->fbbx, pf->fbby,
-			pf->size,
-			pf->ascent, pf->descent,
-			pf->firstchar, pf->firstchar,
-			pf->firstchar+pf->size-1, pf->firstchar+pf->size-1,
-			pf->defaultchar, pf->defaultchar,
-			pf->width? "yes": "no",
-			pf->copyright? pf->copyright: "");
-
-	/* generate bitmaps*/
-	for (i = 0; i < pf->size; ++i) {
-		int x;
-		int bitcount = 0;
-		int width = pf->bbx ? pf->bbx[i].w : pf->fbbw;
-		int height = pf->bbx ? pf->bbx[i].h : pf->fbbh;
-		int xoff = pf->bbx ? pf->bbx[i].x : pf->fbbx;
-		int yoff = pf->bbx ? pf->bbx[i].y : pf->fbby;
-		bitmap_t *bits = pf->bits + (pf->offset? pf->offset[i]: (height * i));
-		bitmap_t bitvalue = 0;
-
-		/*
-		 * Generate bitmap bits only if not this index isn't
-		 * the default character in encode map, or the default
-		 * character hasn't been generated yet.
-		 */
-		if (pf->offset &&
-			(pf->offset[i] == pf->offset[pf->defaultchar-pf->firstchar])) {
-			if (did_defaultchar)
-				continue;
-			did_defaultchar = 1;
-		}
-
-		fprintf(ofp, "\n/* Character %d (0x%02x):\n   width %d\n   bbx ( %d, %d, %d, %d )\n",
-				i+pf->firstchar, i+pf->firstchar,
-				pf->width ? pf->width[i+pf->firstchar] : pf->maxwidth,
-				width, height, xoff, yoff);
-
-		if (gen_map) {
-			fprintf(ofp, "\n   +");
-			for (x=0; x<width; ++x) fprintf(ofp, "-");
-			fprintf(ofp, "+\n");
-
-			x = 0;
-			h = height;
-			while (h > 0) {
-				if (x == 0) fprintf(ofp, "   |");
-
-				if (bitcount <= 0) {
-					bitcount = BITMAP_BITSPERIMAGE;
-					bitvalue = READ_UINT16(bits);
-					bits++;
-				}
-
-				fprintf(ofp, BITMAP_TESTBIT(bitvalue)? "*": " ");
-
-				bitvalue = BITMAP_SHIFTBIT(bitvalue);
-				--bitcount;
-				if (++x == width) {
-					fprintf(ofp, "|\n");
-					--h;
-					x = 0;
-					bitcount = 0;
-				}
-			}
-			fprintf(ofp, "   +");
-			for (x = 0; x < width; ++x)
-				fprintf(ofp, "-");
-			fprintf(ofp, "+\n*/\n");
-		} else
-			fprintf(ofp, "\n*/\n");
-
-		bits = pf->bits + (pf->offset? pf->offset[i]: (height * i));
-		for (x = BITMAP_WORDS(width) * height; x > 0; --x) {
-			fprintf(ofp, "0x%04x,\n", READ_UINT16(bits));
-			if (!did_syncmsg && *bits++ != *ofs++) {
-				fprintf(stderr, "Warning: found encoding values in non-sorted order (not an error).\n");
-				did_syncmsg = 1;
-			}
-		}
-	}
-	fprintf(ofp, "};\n\n");
-
-	if (pf->offset) {
-		/* output offset table*/
-		fprintf(ofp, "/* Character->glyph mapping. */\n"
-				"static const unsigned long _sysfont_offset[] = {\n");
-
-		for (i = 0; i < pf->size; ++i)
-			fprintf(ofp, "	%ld,\t/* (0x%02x) */\n",
-					pf->offset[i], i+pf->firstchar);
-		fprintf(ofp, "};\n\n");
-	}
-
-	/* output width table for proportional fonts*/
-	if (pf->width) {
-		fprintf(ofp, "/* Character width data. */\n"
-				"static const unsigned char _sysfont_width[] = {\n");
-
-		for (i = 0; i < pf->size; ++i)
-			fprintf(ofp, "	%d,\t/* (0x%02x) */\n",
-					pf->width[i], i+pf->firstchar);
-		fprintf(ofp, "};\n\n");
-	}
-
-	/* output bbox table */
-	if (pf->bbx) {
-		fprintf(ofp, "/* Bounding box data. */\n"
-				"static const BBX _sysfont_bbx[] = {\n");
-
-		for (i = 0; i < pf->size; ++i)
-			fprintf(ofp, "\t{ %d, %d, %d, %d },\t/* (0x%02x) */\n",
-				pf->bbx[i].w, pf->bbx[i].h, pf->bbx[i].x, pf->bbx[i].y, i+pf->firstchar);
-		fprintf(ofp, "};\n\n");
-	}
-
-	/* output struct font struct*/
-	if (pf->offset)
-		sprintf(obuf, "_sysfont_offset,");
-	else
-		sprintf(obuf, "0,  /* no encode table*/");
-
-	if (pf->width)
-		sprintf(buf, "_sysfont_width,");
-	else
-		sprintf(buf, "0,  /* fixed width*/");
-
-	if (pf->bbx)
-		sprintf(bbuf, "_sysfont_bbx,");
-	else
-		sprintf(bbuf, "0,  /* fixed bbox*/");
-
-	fprintf(ofp,
-			"/* Exported structure definition. */\n"
-			"static const BdfFontDesc desc = {\n"
-			"\t" "\"%s\",\n"
-			"\t" "%d,\n"
-			"\t" "%d,\n"
-			"\t" "%d, %d, %d, %d,\n"
-			"\t" "%d,\n"
-			"\t" "%d,\n"
-			"\t" "%d,\n"
-			"\t" "_font_bits,\n"
-			"\t" "%s\n"
-			"\t" "%s\n"
-			"\t" "%s\n"
-			"\t" "%d,\n"
-			"\t" "sizeof(_font_bits)/sizeof(bitmap_t)\n"
-			"};\n",
-			pf->name,
-			pf->maxwidth, pf->height,
-			pf->fbbw, pf->fbbh, pf->fbbx, pf->fbby,
-			pf->ascent,
-			pf->firstchar,
-			pf->size,
-			obuf,
-			buf,
-			bbuf,
-			pf->defaultchar);
-
-	fprintf(ofp, "\n" "#if !(defined(__GP32__))\n");
-	fprintf(ofp, "extern const BdfFont g_sysfont(desc);\n");
-	fprintf(ofp, "#else\n");
-	fprintf(ofp, "DEFINE_FONT(g_sysfont)\n");
-	fprintf(ofp, "#endif\n");
-	fprintf(ofp, "\n} // End of namespace Graphics\n");
-	fclose(ofp);
-
-	return 0;
-}
diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp
new file mode 100644
index 0000000..c8b1fb7
--- /dev/null
+++ b/devtools/convbdf.cpp
@@ -0,0 +1,510 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <fstream>
+#include <string>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <time.h>
+
+struct BdfBoundingBox {
+	int width, height;
+	int xOffset, yOffset;
+};
+
+struct BdfFont {
+	int maxAdvance;
+	int height;
+	BdfBoundingBox defaultBox;
+	int ascent;
+
+	int firstCharacter;
+	int defaultCharacter;
+	int numCharacters;
+
+	unsigned char **bitmaps;
+	unsigned char *advances;
+	BdfBoundingBox *boxes;
+
+	BdfFont() : bitmaps(0), advances(0), boxes(0) {
+	}
+
+	~BdfFont() {
+		if (bitmaps) {
+			for (int i = 0; i < numCharacters; ++i)
+				delete[] bitmaps[i];
+		}
+		delete[] bitmaps;
+		delete[] advances;
+		delete[] boxes;
+	}
+};
+
+void error(const char *s, ...) {
+	char buf[1024];
+	va_list va;
+
+	va_start(va, s);
+	vsnprintf(buf, 1024, s, va);
+	va_end(va);
+
+	fprintf(stderr, "ERROR: %s!\n", buf);
+	exit(1);
+}
+
+void warning(const char *s, ...) {
+	char buf[1024];
+	va_list va;
+
+	va_start(va, s);
+	vsnprintf(buf, 1024, s, va);
+	va_end(va);
+
+	fprintf(stderr, "WARNING: %s!\n", buf);
+}
+
+bool hasPrefix(const std::string &str, const std::string &prefix) {
+	return str.compare(0, prefix.size(), prefix) == 0;
+}
+
+inline void hexToInt(unsigned char &h) {
+	if (h >= '0' && h <= '9')
+		h -= '0';
+	else if (h >= 'A' && h <= 'F')
+		h -= 'A' - 10;
+	else if (h >= 'a' && h <= 'f')
+		h -= 'a' - 10;
+	else
+		h = 0;
+}
+
+int main(int argc, char *argv[]) {
+	if (argc != 3) {
+		printf("Usage: convbdf [input] [fontname]\n");
+		return 1;
+	}
+
+	std::ifstream in(argv[1]);
+	std::string line;
+
+	std::getline(in, line);
+	if (in.fail() || in.eof())
+		error("Premature end of file");
+
+	int verMajor, verMinor;
+	if (sscanf(line.c_str(), "STARTFONT %d.%d", &verMajor, &verMinor) != 2)
+		error("File '%s' is no BDF file", argv[1]);
+
+	if (verMajor != 2 || (verMinor != 1 && verMinor != 2))
+		error("File '%s' does not use a supported BDF version (%d.%d)", argv[1], verMajor, verMinor);
+
+	std::string fontName;
+	std::string copyright;
+	BdfFont font;
+	memset(&font, 0, sizeof(font));
+	font.ascent = -1;
+	font.defaultCharacter = -1;
+
+	int charsProcessed = 0, charsAvailable = 0, descent = -1;
+
+	while (true) {
+		std::getline(in, line);
+		if (in.fail() || in.eof())
+			error("Premature end of file");
+
+		if (hasPrefix(line, "SIZE ")) {
+			// Ignore
+		} else if (hasPrefix(line, "FONT ")) {
+			fontName = line.substr(5);
+		} else if (hasPrefix(line, "COPYRIGHT ")) {
+			copyright = line.substr(10);
+		} else if (hasPrefix(line, "COMMENT ")) {
+			// Ignore
+		} else if (hasPrefix(line, "FONTBOUNDINGBOX ")) {
+			if (sscanf(line.c_str(), "FONTBOUNDINGBOX %d %d %d %d",
+			           &font.defaultBox.width, &font.defaultBox.height,
+			           &font.defaultBox.xOffset, &font.defaultBox.yOffset) != 4)
+				error("Invalid FONTBOUNDINGBOX");
+		} else if (hasPrefix(line, "CHARS ")) {
+			if (sscanf(line.c_str(), "CHARS %d", &charsAvailable) != 1)
+				error("Invalid CHARS");
+
+			font.numCharacters = 256;
+			font.bitmaps = new unsigned char *[font.numCharacters];
+			memset(font.bitmaps, 0, sizeof(unsigned char *) * font.numCharacters);
+			font.advances = new unsigned char[font.numCharacters];
+			font.boxes = new BdfBoundingBox[font.numCharacters];
+		} else if (hasPrefix(line, "FONT_ASCENT ")) {
+			if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1)
+				error("Invalid FONT_ASCENT");
+		} else if (hasPrefix(line, "FONT_DESCENT ")) {
+			if (sscanf(line.c_str(), "FONT_DESCENT %d", &descent) != 1)
+				error("Invalid FONT_ASCENT");
+		} else if (hasPrefix(line, "DEFAULT_CHAR ")) {
+			if (sscanf(line.c_str(), "DEFAULT_CHAR %d", &font.defaultCharacter) != 1)
+				error("Invalid DEFAULT_CHAR");
+		} else if (hasPrefix(line, "STARTCHAR ")) {
+			++charsProcessed;
+			if (charsProcessed > charsAvailable)
+				error("Too many characters defined (only %d specified, but %d existing already)",
+				      charsAvailable, charsProcessed);
+
+			bool hasWidth = false, hasBitmap = false;
+
+			int encoding = -1;
+			int xAdvance;
+			unsigned char *bitmap = 0;
+			BdfBoundingBox bbox = font.defaultBox;
+
+			while (true) {
+				std::getline(in, line);
+				if (in.fail() || in.eof())
+					error("Premature end of file");
+
+				if (hasPrefix(line, "ENCODING ")) {
+					if (sscanf(line.c_str(), "ENCODING %d", &encoding) != 1)
+						error("Invalid ENCODING");
+				} else if (hasPrefix(line, "DWIDTH ")) {
+					int yAdvance;
+					if (sscanf(line.c_str(), "DWIDTH %d %d", &xAdvance, &yAdvance) != 2)
+						error("Invalid DWIDTH");
+					if (yAdvance != 0)
+						error("Character %d uses a DWIDTH y advance of %d", encoding, yAdvance);
+					if (xAdvance < 0)
+						error("Character %d has a negative x advance", encoding);
+
+					if (xAdvance > font.maxAdvance)
+						font.maxAdvance = xAdvance;
+
+					hasWidth = true;
+				} else if (hasPrefix(line, "BBX" )) {
+					if (sscanf(line.c_str(), "BBX %d %d %d %d",
+					           &bbox.width, &bbox.height,
+					           &bbox.xOffset, &bbox.yOffset) != 4)
+						error("Invalid BBX");
+				} else if (line == "BITMAP") {
+					hasBitmap = true;
+
+					const size_t bytesPerRow = ((bbox.width + 7) / 8);
+
+					// Since we do not load all characters, we only create a
+					// buffer for the ones we actually load.
+					if (encoding < font.numCharacters)
+						bitmap = new unsigned char[bbox.height * bytesPerRow];
+
+					for (int i = 0; i < bbox.height; ++i) {
+						std::getline(in, line);
+						if (in.fail() || in.eof())
+							error("Premature end of file");
+						if (line.size() != bytesPerRow * 2)
+							error("Glyph bitmap line too short");
+
+						if (!bitmap)
+							continue;
+
+						for (size_t j = 0; j < bytesPerRow; ++j) {
+							unsigned char nibble1 = line[j * 2 + 0];
+							hexToInt(nibble1);
+							unsigned char nibble2 = line[j * 2 + 1];
+							hexToInt(nibble2);
+							bitmap[i * bytesPerRow + j] = (nibble1 << 4) | nibble2;
+						}
+					}
+				} else if (line == "ENDCHAR") {
+					if (encoding == -1 || !hasWidth || !hasBitmap)
+						error("Character not completly defined");
+
+					if (encoding < font.numCharacters) {
+						font.advances[encoding] = xAdvance;
+						font.boxes[encoding] = bbox;
+						font.bitmaps[encoding] = bitmap;
+					}
+					break;
+				}
+			}
+		} else if (line == "ENDFONT") {
+			break;
+		} else {
+			// Silently ignore other declarations
+			//warning("Unsupported declaration: \"%s\"", line.c_str());
+		}
+	}
+
+	if (font.ascent < 0)
+		error("No ascent specified");
+	if (descent < 0)
+		error("No descent specified");
+
+	font.height = font.ascent + descent;
+
+	int firstCharacter = font.numCharacters;
+	int lastCharacter = -1;
+	bool hasFixedBBox = true;
+	bool hasFixedAdvance = true;
+
+	for (int i = 0; i < font.numCharacters; ++i) {
+		if (!font.bitmaps[i])
+			continue;
+
+		if (i < firstCharacter)
+			firstCharacter = i;
+
+		if (i > lastCharacter)
+			lastCharacter = i;
+
+		if (font.advances[i] != font.maxAdvance)
+			hasFixedAdvance = false;
+
+		const BdfBoundingBox &bbox = font.boxes[i];
+		if (bbox.width != font.defaultBox.width
+		    || bbox.height != font.defaultBox.height
+		    || bbox.xOffset != font.defaultBox.xOffset
+		    || bbox.yOffset != font.defaultBox.yOffset)
+			hasFixedBBox = false;
+	}
+
+	if (lastCharacter == -1)
+		error("No glyphs found");
+
+	// Free the advance table, in case all glyphs use the same advance
+	if (hasFixedAdvance) {
+		delete[] font.advances;
+		font.advances = 0;
+	}
+
+	// Free the box table, in case all glyphs use the same box
+	if (hasFixedBBox) {
+		delete[] font.boxes;
+		font.boxes = 0;
+	}
+
+	// Adapt for the fact that we never use encoding 0.
+	if (font.defaultCharacter < firstCharacter
+	    || font.defaultCharacter > lastCharacter)
+		font.defaultCharacter = -1;
+
+	font.firstCharacter = firstCharacter;
+
+	charsAvailable = lastCharacter - firstCharacter + 1;
+	// Try to compact the tables
+	if (charsAvailable < font.numCharacters) {
+		unsigned char **bitmaps = new unsigned char *[charsAvailable];
+		BdfBoundingBox *boxes = 0;
+		if (!hasFixedBBox)
+			boxes = new BdfBoundingBox[charsAvailable];
+		unsigned char *advances = 0;
+		if (!hasFixedAdvance)
+			advances = new unsigned char[charsAvailable];
+
+		for (int i = 0; i < charsAvailable; ++i) {
+			const int encoding = i + firstCharacter;
+			if (font.bitmaps[encoding]) {
+				bitmaps[i] = font.bitmaps[encoding];
+
+				if (!hasFixedBBox)
+					boxes[i] = font.boxes[encoding];
+				if (!hasFixedAdvance)
+					advances[i] = font.advances[encoding];
+			} else {
+				bitmaps[i] = 0;
+			}
+		}
+
+		delete[] font.bitmaps;
+		font.bitmaps = bitmaps;
+		delete[] font.advances;
+		font.advances = advances;
+		delete[] font.boxes;
+		font.boxes = boxes;
+
+		font.numCharacters = charsAvailable;
+	}
+
+	char dateBuffer[256];
+	time_t curTime = time(0);
+	snprintf(dateBuffer, sizeof(dateBuffer), "%s", ctime(&curTime));
+
+	// Finally output the cpp source file to stdout
+	printf("// Generated by convbdf on %s"
+	       "#include \"graphics/fonts/bdf.h\"\n"
+	       "\n"
+	       "// Font information:\n"
+	       "//  Name: %s\n"
+	       "//  Size: %dx%d\n"
+	       "//  Box: %d %d %d %d\n"
+	       "//  Ascent: %d\n"
+	       "//  First character: %d\n"
+	       "//  Default character: %d\n"
+	       "//  Characters: %d\n"
+	       "//  Copyright: %s\n"
+	       "\n",
+	       dateBuffer, fontName.c_str(), font.maxAdvance, font.height,
+	       font.defaultBox.width, font.defaultBox.height, font.defaultBox.xOffset,
+	       font.defaultBox.yOffset, font.ascent, font.firstCharacter,
+	       font.defaultCharacter, font.numCharacters, copyright.c_str());
+
+	printf("namespace Graphics {\n"
+	       "\n");
+
+	for (int i = 0; i < font.numCharacters; ++i) {
+		if (!font.bitmaps[i])
+			continue;
+
+		BdfBoundingBox box = hasFixedBBox ? font.defaultBox : font.boxes[i];
+		printf("// Character %d (0x%02X)\n"
+		       "// Box: %d %d %d %d\n"
+		       "// Advance: %d\n"
+		       "//\n", i + font.firstCharacter, i + font.firstCharacter,
+		       box.width, box.height, box.xOffset, box.yOffset,
+		       hasFixedAdvance ? font.maxAdvance : font.advances[i]);
+
+		printf("// +");
+		for (int x = 0; x < box.width; ++x)
+			printf("-");
+		printf("+\n");
+
+		const unsigned char *bitmap = font.bitmaps[i];
+
+		for (int y = 0; y < box.height; ++y) {
+			printf("// |");
+			unsigned char data;
+			for (int x = 0; x < box.width; ++x) {
+				if (!(x % 8))
+					data = *bitmap++;
+
+				printf("%c", (data & 0x80) ? '*' : ' ');
+				data <<= 1;
+			}
+			printf("|\n");
+		}
+
+		printf("// +");
+		for (int x = 0; x < box.width; ++x)
+			printf("-");
+		printf("+\n");
+
+		const int bytesPerRow = (box.width + 7) / 8;
+		bitmap = font.bitmaps[i];
+		printf("static const byte glyph%d[] = {\n", i);
+		for (int y = 0; y < box.height; ++y) {
+			printf("\t");
+
+			for (int x = 0; x < bytesPerRow; ++x) {
+				if (x)
+					printf(", ");
+				printf("0x%02X", *bitmap++);
+			}
+
+			if (y != box.height - 1)
+				printf(",");
+			printf("\n");
+		}
+		printf("};\n"
+		       "\n");
+	}
+
+	printf("// Bitmap pointer table\n"
+	       "const byte *const bitmapTable[] = {\n");
+	for (int i = 0; i < font.numCharacters; ++i) {
+		if (font.bitmaps[i])
+			printf("\tglyph%d", i);
+		else
+			printf("\t0");
+
+		if (i != font.numCharacters - 1)
+			printf(",");
+		printf("\n");
+	}
+	printf("};\n"
+	       "\n");
+
+	if (!hasFixedAdvance) {
+		printf("// Advance table\n"
+		       "static const byte advances[] = {\n");
+		for (int i = 0; i < font.numCharacters; ++i) {
+			if (font.bitmaps[i])
+				printf("\t%d", font.advances[i]);
+			else
+				printf("\t0");
+
+			if (i != font.numCharacters - 1)
+				printf(",");
+			printf("\n");
+		}
+		printf("};\n"
+		       "\n");
+	}
+
+	if (!hasFixedBBox) {
+		printf("// Bounding box table\n"
+		       "static const BdfBoundingBox boxes[] = {\n");
+		for (int i = 0; i < font.numCharacters; ++i) {
+			if (font.bitmaps[i]) {
+				const BdfBoundingBox &box = font.boxes[i];
+				printf("\t{ %d, %d, %d, %d }", box.width, box.height, box.xOffset, box.yOffset);
+			} else {
+				printf("\t{ 0, 0, 0, 0 }");
+			}
+
+			if (i != font.numCharacters - 1)
+				printf(",");
+			printf("\n");
+		}
+		printf("};\n"
+		       "\n");
+	}
+
+	printf("// Font structure\n"
+	       "static const BdfFontData desc = {\n"
+	       "\t%d, // Max advance\n"
+	       "\t%d, // Height\n"
+	       "\t{ %d, %d, %d, %d }, // Bounding box\n"
+	       "\t%d, // Ascent\n"
+	       "\n"
+	       "\t%d, // First character\n"
+	       "\t%d, // Default character\n"
+	       "\t%d, // Characters\n"
+	       "\n"
+	       "\tbitmapTable, // Bitmaps\n",
+	       font.maxAdvance, font.height, font.defaultBox.width,
+	       font.defaultBox.height, font.defaultBox.xOffset, font.defaultBox.yOffset,
+	       font.ascent, font.firstCharacter, font.defaultCharacter, font.numCharacters);
+
+	if (hasFixedAdvance)
+		printf("\t0, // Advances\n");
+	else
+		printf("\tadvances, // Advances\n");
+
+	if (hasFixedBBox)
+		printf("\t0 // Boxes\n");
+	else
+		printf("\tboxes // Boxes\n");
+
+	printf("};\n"
+	       "\n"
+	       "DEFINE_FONT(%s)\n"
+	       "\n"
+	       "} // End of namespace Graphics\n",
+	       argv[2]);
+}
diff --git a/devtools/module.mk b/devtools/module.mk
index 1ff5ba6..95eca50 100644
--- a/devtools/module.mk
+++ b/devtools/module.mk
@@ -32,9 +32,9 @@ clean-devtools:
 # Build rules for the devtools
 #
 
-devtools/convbdf$(EXEEXT): $(srcdir)/devtools/convbdf.c
+devtools/convbdf$(EXEEXT): $(srcdir)/devtools/convbdf.cpp
 	$(QUIET)$(MKDIR) devtools/$(DEPDIR)
-	$(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
+	$(QUIET_LINK)$(LD) $(CXXFLAGS) -Wall -o $@ $<
 
 devtools/md5table$(EXEEXT): $(srcdir)/devtools/md5table.c
 	$(QUIET)$(MKDIR) devtools/$(DEPDIR)
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp
index 58c48ed..2bc0582 100644
--- a/graphics/fonts/bdf.cpp
+++ b/graphics/fonts/bdf.cpp
@@ -29,768 +29,590 @@
 
 namespace Graphics {
 
-void free_font(BdfFontData *pf);
+BdfFont::BdfFont(const BdfFontData &data, DisposeAfterUse::Flag dispose)
+	: _data(data), _dispose(dispose) {
+}
 
 BdfFont::~BdfFont() {
-	if (_font) {
-		free_font(_font);
+	if (_dispose == DisposeAfterUse::YES) {
+		for (int i = 0; i < _data.numCharacters; ++i)
+			delete[] _data.bitmaps[i];
+		delete[] _data.bitmaps;
+		delete[] _data.advances;
+		delete[] _data.boxes;
 	}
 }
 
 int BdfFont::getFontHeight() const {
-	return _desc.height;
+	return _data.height;
 }
 
 int BdfFont::getMaxCharWidth() const {
-	return _desc.maxwidth;
+	return _data.maxAdvance;
 }
 
 int BdfFont::getCharWidth(byte chr) const {
-	// If no width table is specified, return the maximum width
-	if (!_desc.width)
-		return _desc.maxwidth;
-	// If this character is not included in the font, use the default char.
-	if (chr < _desc.firstchar || _desc.firstchar + _desc.size < chr) {
-		chr = _desc.defaultchar;
-	}
-	return _desc.width[chr - _desc.firstchar];
+	// In case all font have the same advance value, we use the maximum.
+	if (!_data.advances)
+		return _data.maxAdvance;
+
+	const int ch = mapToIndex(chr);
+	// In case no mapping exists, we use the maximum advance.
+	if (ch < 0)
+		return _data.maxAdvance;
+	else
+		return _data.advances[ch];
 }
 
 
 template<typename PixelType>
-void drawCharIntern(byte *ptr, uint pitch, const bitmap_t *src, int h, int minX, int maxX, const PixelType color) {
-	const bitmap_t maxXMask = ~((1 << (16 - maxX)) - 1);
-	while (h-- > 0) {
-		bitmap_t buffer = READ_UINT16(src);
-		src++;
-
-		buffer &= maxXMask;
-		buffer <<= minX;
-		PixelType *tmp = (PixelType *)ptr;
-		while (buffer != 0) {
-			if ((buffer & 0x8000) != 0)
-				*tmp = color;
-			tmp++;
-			buffer <<= 1;
+void drawCharIntern(byte *ptr, uint pitch, const byte *src, int h, int width, int minX, int maxX, const PixelType color) {
+	byte data;
+	while (h--) {
+		PixelType *dst = (PixelType *)ptr;
+
+		for (int x = 0; x < width; ++x) {
+			if (!(x % 8))
+				data = *src++;
+
+			if (x >= minX && x <= maxX && (data & 0x80))
+				dst[x] = color;
+
+			data <<= 1;
 		}
 
 		ptr += pitch;
 	}
 }
 
+int BdfFont::mapToIndex(byte ch) const {
+	// Check whether the character is included
+	if (_data.firstCharacter <= ch && ch <= _data.firstCharacter + _data.numCharacters) {
+		if (_data.bitmaps[ch - _data.firstCharacter])
+			return ch - _data.firstCharacter;
+	}
+
+	return _data.defaultCharacter - _data.firstCharacter;
+}
+
 void BdfFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const uint32 color) const {
 	assert(dst != 0);
 
-	// asserting _desc.maxwidth <= 50: let the theme designer decide what looks best
-	assert(_desc.bits != 0 && _desc.maxwidth <= 50);
+	// TODO: Where is the relation between the max advance being smaller or
+	// equal to 50 and the decision of the theme designer?
+	// asserting _data.maxAdvance <= 50: let the theme designer decide what looks best
+	assert(_data.maxAdvance <= 50);
 	assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2);
 
-	// If this character is not included in the font, use the default char.
-	if (chr < _desc.firstchar || chr >= _desc.firstchar + _desc.size) {
-		chr = _desc.defaultchar;
-	}
-
-	chr -= _desc.firstchar;
+	const int idx = mapToIndex(chr);
+	if (idx < 0)
+		return;
 
-	int bbw, bbh, bbx, bby;
+	int width, height, xOffset, yOffset;
 
 	// Get the bounding box of the character
-	if (!_desc.bbx) {
-		bbw = _desc.fbbw;
-		bbh = _desc.fbbh;
-		bbx = _desc.fbbx;
-		bby = _desc.fbby;
+	if (!_data.boxes) {
+		width = _data.defaultBox.width;
+		height = _data.defaultBox.height;
+		xOffset = _data.defaultBox.xOffset;
+		yOffset = _data.defaultBox.yOffset;
 	} else {
-		bbw = _desc.bbx[chr].w;
-		bbh = _desc.bbx[chr].h;
-		bbx = _desc.bbx[chr].x;
-		bby = _desc.bbx[chr].y;
+		width = _data.boxes[idx].width;
+		height = _data.boxes[idx].height;
+		xOffset = _data.boxes[idx].xOffset;
+		yOffset = _data.boxes[idx].yOffset;
 	}
 
-	byte *ptr = (byte *)dst->getBasePtr(tx + bbx, ty + _desc.ascent - bby - bbh);
+	int y = ty + _data.ascent - yOffset - height;
+	int x = tx + xOffset;
 
-	const bitmap_t *tmp = _desc.bits + (_desc.offset ? _desc.offset[chr] : (chr * _desc.fbbh));
+	const byte *src = _data.bitmaps[idx];
 
-	int y = MIN(bbh, ty + _desc.ascent - bby);
-	tmp += bbh - y;
-	y -= MAX(0, ty + _desc.ascent - bby - dst->h);
+	const int bytesPerRow = (width + 7) / 8;
+	const int originalWidth = width;
 
-	if (dst->format.bytesPerPixel == 1)
-		drawCharIntern<byte>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
-	else if (dst->format.bytesPerPixel == 2)
-		drawCharIntern<uint16>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
-}
+	// Make sure we do not draw outside the surface
+	if (y < 0) {
+		src -= y * bytesPerRow;
+		height += y;
+		y = 0;
+	}
 
+	if (y + height > dst->h)
+		height = dst->h - y;
 
-#pragma mark -
-
-/* BEGIN font.h*/
-/* bitmap_t helper macros*/
-#define BITMAP_WORDS(x)         (((x)+15)/16)   /* image size in words*/
-#define BITMAP_BYTES(x)         (BITMAP_WORDS(x)*sizeof(bitmap_t))
-#define BITMAP_BITSPERIMAGE     (sizeof(bitmap_t) * 8)
-#define BITMAP_BITVALUE(n)      ((bitmap_t) (((bitmap_t) 1) << (n)))
-#define BITMAP_FIRSTBIT         (BITMAP_BITVALUE(BITMAP_BITSPERIMAGE - 1))
-#define BITMAP_TESTBIT(m)       ((m) & BITMAP_FIRSTBIT)
-#define BITMAP_SHIFTBIT(m)      ((bitmap_t) ((m) << 1))
-
-/* builtin C-based proportional/fixed font structure */
-/* based on The Microwindows Project http://microwindows.org */
-struct BdfFontData {
-	char          *name;       /* font name */
-	int           maxwidth;    /* max width in pixels */
-	int           height;      /* height in pixels */
-	int           ascent;      /* ascent (baseline) height */
-	int           firstchar;   /* first character in bitmap */
-	int           size;        /* font size in glyphs */
-	bitmap_t      *bits;       /* 16-bit right-padded bitmap data */
-	unsigned long *offset;     /* offsets into bitmap data */
-	unsigned char *width;      /* character widths or NULL if fixed */
-	BBX           *bbx;        /* character bounding box or NULL if fixed */
-	int           defaultchar; /* default char (not glyph index) */
-	long          bits_size;   /* # words of bitmap_t bits */
-
-	/* unused by runtime system, read in by convbdf */
-	char          *facename;   /* facename of font */
-	char          *copyright;  /* copyright info for loadable fonts */
-	int           pixel_size;
-	int           descent;
-	int           fbbw, fbbh, fbbx, fbby;
-};
-/* END font.h */
-
-#define isprefix(buf,str)   (!strncmp(buf, str, strlen(str)))
-#define strequal(s1,s2)     (!strcmp(s1, s2))
-
-#define EXTRA   300
-
-int start_char = 0;
-int limit_char = 255;
-
-BdfFontData *bdf_read_font(Common::SeekableReadStream &fp);
-int bdf_read_header(Common::SeekableReadStream &fp, BdfFontData *pf);
-int bdf_read_bitmaps(Common::SeekableReadStream &fp, BdfFontData *pf);
-char *bdf_getline(Common::SeekableReadStream &fp, char *buf, int len);
-bitmap_t bdf_hexval(unsigned char *buf);
-
-void free_font(BdfFontData *pf) {
-	if (!pf)
+	if (height <= 0)
 		return;
-	free(pf->name);
-	free(pf->facename);
-	free(pf->copyright);
-	free(pf->bits);
-	free(pf->offset);
-	free(pf->width);
-	free(pf->bbx);
-	free(pf);
-}
-
-/* build incore structure from .bdf file*/
-BdfFontData *bdf_read_font(Common::SeekableReadStream &fp) {
-	BdfFontData *pf;
-	uint32 pos = fp.pos();
 
-	pf = (BdfFontData *)calloc(1, sizeof(BdfFontData));
-	if (!pf)
-		goto errout;
-
-	if (!bdf_read_header(fp, pf)) {
-		warning("Error reading font header");
-		goto errout;
+	int xStart = 0;
+	if (x < 0) {
+		xStart = -x;
+		width += x;
+		x = 0;
 	}
 
-	fp.seek(pos, SEEK_SET);
+	if (x + width > dst->w)
+		width = dst->w - x;
 
-	if (!bdf_read_bitmaps(fp, pf)) {
-		warning("Error reading font bitmaps");
-		goto errout;
-	}
+	if (width <= 0)
+		return;
 
-	return pf;
+	const int xEnd = xStart + width - 1;
 
-errout:
-	free_font(pf);
-	return NULL;
+	byte *ptr = (byte *)dst->getBasePtr(x, y);
+
+	if (dst->format.bytesPerPixel == 1)
+		drawCharIntern<byte>(ptr, dst->pitch, src, height, originalWidth, xStart, xEnd, color);
+	else if (dst->format.bytesPerPixel == 2)
+		drawCharIntern<uint16>(ptr, dst->pitch, src, height, originalWidth, xStart, xEnd, color);
 }
 
-/* read bdf font header information, return 0 on error*/
-int bdf_read_header(Common::SeekableReadStream &fp, BdfFontData *pf) {
-	int encoding = 0;
-	int nchars = 0, maxwidth, maxheight;
-	int firstchar = 65535;
-	int lastchar = -1;
-	char buf[256];
-	char facename[256];
-	char copyright[256];
-	memset(facename, 0, sizeof(facename));
-	memset(copyright, 0, sizeof(copyright));
-
-	/* set certain values to errors for later error checking*/
-	pf->defaultchar = -1;
-	pf->ascent = -1;
-	pf->descent = -1;
-
-	for (;;) {
-		if (!bdf_getline(fp, buf, sizeof(buf))) {
-			warning("Error: EOF on file");
-			return 0;
-		}
+namespace {
 
-		/* note: the way sscanf is used here ensures that a terminating null
-		   character is automatically added. Refer to:
-		   http://pubs.opengroup.org/onlinepubs/009695399/functions/fscanf.html */
+inline byte hexToInt(char c) {
+	if (c >= '0' && c <= '9')
+		return c - '0';
+	else if (c >= 'A' && c <= 'F')
+		return c - 'A' + 10;
+	else if (c >= 'a' && c <= 'f')
+		return c - 'a' + 10;
+	else
+		return 0;
+}
 
-		if (isprefix(buf, "FONT ")) {       /* not required*/
-			if (sscanf(buf, "FONT %[^\n]", facename) != 1) {
-				warning("Error: bad 'FONT'");
-				return 0;
-			}
+byte *loadCharacter(Common::SeekableReadStream &stream, int &encoding, int &advance, BdfBoundingBox &box) {
+	Common::String line;
+	byte *bitmap = 0;
 
-			pf->facename = strdup(facename);
-			continue;
+	while (true) {
+		line = stream.readLine();
+		if (stream.err() || stream.eos()) {
+			warning("BdfFont::loadCharacter: Premature end of file");
+			delete[] bitmap;
+			return 0;
 		}
-		if (isprefix(buf, "COPYRIGHT ")) {  /* not required*/
-			if (sscanf(buf, "COPYRIGHT \"%[^\"]", copyright) != 1) {
-				warning("Error: bad 'COPYRIGHT'");
-				return 0;
-			}
 
-			pf->copyright = strdup(copyright);
-			continue;
-		}
-		if (isprefix(buf, "DEFAULT_CHAR ")) {   /* not required*/
-			if (sscanf(buf, "DEFAULT_CHAR %d", &pf->defaultchar) != 1) {
-				warning("Error: bad 'DEFAULT_CHAR'");
+		if (line.hasPrefix("ENCODING ")) {
+			if (sscanf(line.c_str(), "ENCODING %d", &encoding) != 1) {
+				warning("BdfFont::loadCharacter: Invalid ENCODING");
+				delete[] bitmap;
 				return 0;
 			}
-		}
-		if (isprefix(buf, "FONT_DESCENT ")) {
-			if (sscanf(buf, "FONT_DESCENT %d", &pf->descent) != 1) {
-				warning("Error: bad 'FONT_DESCENT'");
+		} else if (line.hasPrefix("DWIDTH ")) {
+			int yAdvance;
+			if (sscanf(line.c_str(), "DWIDTH %d %d", &advance, &yAdvance) != 2) {
+				warning("BdfFont::loadCharacter: Invalid DWIDTH");
+				delete[] bitmap;
 				return 0;
 			}
-			continue;
-		}
-		if (isprefix(buf, "FONT_ASCENT ")) {
-			if (sscanf(buf, "FONT_ASCENT %d", &pf->ascent) != 1) {
-				warning("Error: bad 'FONT_ASCENT'");
+
+			if (yAdvance != 0) {
+				warning("BdfFont::loadCharacter: Character %d has an y advance of %d", encoding, yAdvance);
+				delete[] bitmap;
 				return 0;
 			}
-			continue;
-		}
-		if (isprefix(buf, "FONTBOUNDINGBOX ")) {
-			if (sscanf(buf, "FONTBOUNDINGBOX %d %d %d %d",
-			           &pf->fbbw, &pf->fbbh, &pf->fbbx, &pf->fbby) != 4) {
-				warning("Error: bad 'FONTBOUNDINGBOX'");
+
+			if (advance < 0) {
+				warning("BdfFont::loadCharacter: Character %d has an x advance of %d", encoding, advance);
+				delete[] bitmap;
 				return 0;
 			}
-			continue;
-		}
-		if (isprefix(buf, "CHARS ")) {
-			if (sscanf(buf, "CHARS %d", &nchars) != 1) {
-				warning("Error: bad 'CHARS'");
+		} else if (line.hasPrefix("BBX ")) {
+			int width, height, xOffset, yOffset;
+			if (sscanf(line.c_str(), "BBX %d %d %d %d",
+			           &width, &height, &xOffset, &yOffset) != 4) {
+				warning("BdfFont::loadCharacter: Invalid BBX");
+				delete[] bitmap;
 				return 0;
 			}
-			continue;
-		}
 
-		/*
-		 * Reading ENCODING is necessary to get firstchar/lastchar
-		 * which is needed to pre-calculate our offset and widths
-		 * array sizes.
-		 */
-		if (isprefix(buf, "ENCODING ")) {
-			if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
-				warning("Error: bad 'ENCODING'");
-				return 0;
-			}
-			if (encoding >= 0 &&
-			        encoding <= limit_char &&
-			        encoding >= start_char) {
-
-				if (firstchar > encoding)
-					firstchar = encoding;
-				if (lastchar < encoding)
-					lastchar = encoding;
+			box.width = width;
+			box.height = height;
+			box.xOffset = xOffset;
+			box.yOffset = yOffset;
+		} else if (line == "BITMAP") {
+			const uint bytesPerRow = (box.width + 7) / 8;
+			byte *dst = bitmap = new byte[box.height * bytesPerRow];
+
+			for (int y = 0; y < box.height; ++y) {
+				line = stream.readLine();
+				if (stream.err() || stream.eos()) {
+					warning("BdfFont::loadCharacter: Premature end of file");
+					delete[] bitmap;
+					return 0;
+				}
+
+				if (line.size() != 2 * bytesPerRow) {
+					warning("BdfFont::loadCharacter: Pixel line has wrong size");
+					delete[] bitmap;
+					return 0;
+				}
+
+				for (uint x = 0; x < bytesPerRow; ++x) {
+					char nibble1 = line[x * 2 + 0];
+					char nibble2 = line[x * 2 + 1];
+					*dst++ = (hexToInt(nibble1) << 4) | hexToInt(nibble2);
+				}
 			}
-			continue;
+		} else if (line == "ENDCHAR") {
+			return bitmap;
 		}
-		if (strequal(buf, "ENDFONT"))
-			break;
 	}
 
-	/* calc font height*/
-	if (pf->ascent < 0 || pf->descent < 0 || firstchar < 0) {
-		warning("Error: Invalid BDF file, requires FONT_ASCENT/FONT_DESCENT/ENCODING");
-		return 0;
-	}
-	pf->height = pf->ascent + pf->descent;
-
-	/* calc default char*/
-	if (pf->defaultchar < 0 ||
-	        pf->defaultchar < firstchar ||
-	        pf->defaultchar > limit_char)
-		pf->defaultchar = firstchar;
-
-	/* calc font size (offset/width entries)*/
-	pf->firstchar = firstchar;
-	pf->size = lastchar - firstchar + 1;
-
-	/* use the font boundingbox to get initial maxwidth*/
-	/*maxwidth = pf->fbbw - pf->fbbx;*/
-	maxwidth = pf->fbbw;
-	maxheight = pf->fbbh;
-
-	/* initially use font bounding box for bits allocation*/
-	pf->bits_size = nchars * BITMAP_WORDS(maxwidth) * maxheight;
-
-	/* allocate bits, offset, and width arrays*/
-	pf->bits = (bitmap_t *)malloc(pf->bits_size * sizeof(bitmap_t) + EXTRA);
-	pf->offset = (unsigned long *)malloc(pf->size * sizeof(unsigned long));
-	pf->width = (unsigned char *)malloc(pf->size * sizeof(unsigned char));
-	pf->bbx = (BBX *)malloc(pf->size * sizeof(BBX));
-
-	if (!pf->bits || !pf->offset || !pf->width) {
-		warning("Error: no memory for font load");
-		return 0;
-	}
+	delete[] bitmap;
+	return 0;
+}
 
-	return 1;
+void freeBitmaps(byte **bitmaps, int size) {
+	for (int i = 0; i < size; ++i)
+		delete[] bitmaps[i];
 }
 
-/* read bdf font bitmaps, return 0 on error*/
-int bdf_read_bitmaps(Common::SeekableReadStream &fp, BdfFontData *pf) {
-	long ofs = 0;
-	int maxwidth = 0;
-	int i, k, encoding = 0, width = 0;
-	int bbw = 0, bbh = 0, bbx = 0, bby = 0;
-	int proportional = 0;
-	int need_bbx = 0;
-	int encodetable = 0;
-	long l;
-	char buf[256];
-
-	/* initially mark offsets as not used*/
-	for (i = 0; i < pf->size; ++i)
-		pf->offset[i] = (unsigned long)-1;
-
-	for (;;) {
-		if (!bdf_getline(fp, buf, sizeof(buf))) {
-			warning("Error: EOF on file");
+} // End of anonymous namespace
+
+BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) {
+	BdfFontData font;
+	memset(&font, 0, sizeof(font));
+	font.ascent = -1;
+	font.defaultCharacter = -1;
+
+	// We only load the first 256 characters
+	font.numCharacters = 256;
+	byte **bitmaps = new byte *[font.numCharacters];
+	memset(bitmaps, 0, sizeof(byte *) * font.numCharacters);
+	byte *advances = new byte[font.numCharacters];
+	BdfBoundingBox *boxes = new BdfBoundingBox[font.numCharacters];
+
+	int descent = -1;
+
+	Common::String line;
+	while (true) {
+		line = stream.readLine();
+		if (stream.err() || stream.eos()) {
+			warning("BdfFont::loadFont: Premature end of file");
+			freeBitmaps(bitmaps, font.numCharacters);
+			delete[] bitmaps;
+			delete[] advances;
+			delete[] boxes;
 			return 0;
 		}
-		if (isprefix(buf, "STARTCHAR")) {
-			encoding = width = bbw = bbh = bbx = bby = -1;
-			continue;
-		}
-		if (isprefix(buf, "ENCODING ")) {
-			if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
-				warning("Error: bad 'ENCODING'");
+
+		// Only parse and handle declarations we actually need
+		if (line.hasPrefix("FONTBOUNDINGBOX ")) {
+			int width, height, xOffset, yOffset;
+			if (sscanf(line.c_str(), "FONTBOUNDINGBOX %d %d %d %d",
+			           &width, &height, &xOffset, &yOffset) != 4) {
+				warning("BdfFont::loadFont: Invalid FONTBOUNDINGBOX");
+				freeBitmaps(bitmaps, font.numCharacters);
+				delete[] bitmaps;
+				delete[] advances;
+				delete[] boxes;
 				return 0;
 			}
-			if (encoding < start_char || encoding > limit_char)
-				encoding = -1;
-			continue;
-		}
-		if (isprefix(buf, "DWIDTH ")) {
-			if (sscanf(buf, "DWIDTH %d", &width) != 1) {
-				warning("Error: bad 'DWIDTH'");
+
+			font.defaultBox.width = width;
+			font.defaultBox.height = height;
+			font.defaultBox.xOffset = xOffset;
+			font.defaultBox.yOffset = yOffset;
+		} else if (line.hasPrefix("FONT_ASCENT ")) {
+			if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1) {
+				warning("BdfFont::loadFont: Invalid FONT_ASCENT");
+				freeBitmaps(bitmaps, font.numCharacters);
+				delete[] bitmaps;
+				delete[] advances;
+				delete[] boxes;
 				return 0;
 			}
-			/* use font boundingbox width if DWIDTH <= 0*/
-			if (width <= 0)
-				width = pf->fbbw - pf->fbbx;
-			continue;
-		}
-		if (isprefix(buf, "BBX ")) {
-			if (sscanf(buf, "BBX %d %d %d %d", &bbw, &bbh, &bbx, &bby) != 4) {
-				warning("Error: bad 'BBX'");
+		} else if (line.hasPrefix("FONT_DESCENT ")) {
+			if (sscanf(line.c_str(), "FONT_DESCENT %d", &descent) != 1) {
+				warning("BdfFont::loadFont: Invalid FONT_DESCENT");
+				freeBitmaps(bitmaps, font.numCharacters);
+				delete[] bitmaps;
+				delete[] advances;
+				delete[] boxes;
 				return 0;
 			}
-			continue;
-		}
-		if (strequal(buf, "BITMAP")) {
-			bitmap_t *ch_bitmap = pf->bits + ofs;
-			int ch_words;
-
-			if (encoding < 0)
-				continue;
-
-			/* set bits offset in encode map*/
-			if (pf->offset[encoding - pf->firstchar] != (unsigned long)-1) {
-				warning("Error: duplicate encoding for character %d (0x%02x), ignoring duplicate",
-				        encoding, encoding);
-				continue;
+		} else if (line.hasPrefix("DEFAULT_CHAR ")) {
+			if (sscanf(line.c_str(), "DEFAULT_CHAR %d", &font.defaultCharacter) != 1) {
+				warning("BdfFont::loadFont: Invalid DEFAULT_CHAR");
+				freeBitmaps(bitmaps, font.numCharacters);
+				delete[] bitmaps;
+				delete[] advances;
+				delete[] boxes;
+				return 0;
+			}
+		} else if (line.hasPrefix("STARTCHAR ")) {
+			BdfBoundingBox box = font.defaultBox;
+			int encoding = -1;
+			int advance = -1;
+			byte *bitmap = loadCharacter(stream, encoding, advance, box);
+
+			// Ignore all characters above 255.
+			if (encoding < -1 || encoding >= font.numCharacters) {
+				delete[] bitmap;
+				encoding = -1;
 			}
-			pf->offset[encoding - pf->firstchar] = ofs;
-			pf->width[encoding - pf->firstchar] = width;
 
-			pf->bbx[encoding - pf->firstchar].w = bbw;
-			pf->bbx[encoding - pf->firstchar].h = bbh;
-			pf->bbx[encoding - pf->firstchar].x = bbx;
-			pf->bbx[encoding - pf->firstchar].y = bby;
+			// Calculate the max advance
+			if (encoding != -1 && advance > font.maxAdvance)
+				font.maxAdvance = advance;
 
-			if (width > maxwidth)
-				maxwidth = width;
+			if (!bitmap && encoding != -1) {
+				warning("BdfFont::loadFont: Character %d invalid", encoding);
+				freeBitmaps(bitmaps, font.numCharacters);
+				delete[] bitmaps;
+				delete[] advances;
+				delete[] boxes;
+				return 0;
+			}
 
-			/* clear bitmap*/
-			memset(ch_bitmap, 0, BITMAP_BYTES(bbw) * bbh);
+			if (encoding != -1) {
+				bitmaps[encoding] = bitmap;
+				advances[encoding] = advance;
+				boxes[encoding] = box;
+			}
+		} else if (line == "ENDFONT") {
+			break;
+		}
+	}
 
-			ch_words = BITMAP_WORDS(bbw);
+	if (font.ascent < 0 || descent < 0) {
+		warning("BdfFont::loadFont: Invalid ascent or descent");
+		freeBitmaps(bitmaps, font.numCharacters);
+		delete[] bitmaps;
+		delete[] advances;
+		delete[] boxes;
+		return 0;
+	}
 
-			/* read bitmaps*/
-			for (i = 0; i < bbh; ++i) {
-				if (!bdf_getline(fp, buf, sizeof(buf))) {
-					warning("Error: EOF reading BITMAP data");
-					return 0;
-				}
-				if (isprefix(buf, "ENDCHAR"))
-					break;
-
-				for (k = 0; k < ch_words; ++k) {
-					bitmap_t value;
-
-					value = bdf_hexval((unsigned char *)buf);
-					if (bbw > 8) {
-						WRITE_UINT16(ch_bitmap, value);
-					} else {
-						WRITE_UINT16(ch_bitmap, value << 8);
-					}
-					ch_bitmap++;
-				}
-			}
+	font.height = font.ascent + descent;
+
+	font.bitmaps = bitmaps;
+	font.advances = advances;
+	font.boxes = boxes;
+
+	int firstCharacter = font.numCharacters;
+	int lastCharacter = -1;
+	bool hasFixedBBox = true;
+	bool hasFixedAdvance = true;
 
-			ofs += ch_words * bbh;
+	for (int i = 0; i < font.numCharacters; ++i) {
+		if (!font.bitmaps[i])
 			continue;
-		}
-		if (strequal(buf, "ENDFONT"))
-			break;
-	}
 
-	/* set max width*/
-	pf->maxwidth = maxwidth;
+		if (i < firstCharacter)
+			firstCharacter = i;
 
-	/* change unused offset/width values to default char values*/
-	for (i = 0; i < pf->size; ++i) {
-		int defchar = pf->defaultchar - pf->firstchar;
+		if (i > lastCharacter)
+			lastCharacter = i;
 
-		if (pf->offset[i] == (unsigned long)-1) {
-			pf->offset[i] = pf->offset[defchar];
-			pf->width[i] = pf->width[defchar];
-			pf->bbx[i].w = pf->bbx[defchar].w;
-			pf->bbx[i].h = pf->bbx[defchar].h;
-			pf->bbx[i].x = pf->bbx[defchar].x;
-			pf->bbx[i].y = pf->bbx[defchar].y;
-		}
-	}
+		if (font.advances[i] != font.maxAdvance)
+			hasFixedAdvance = false;
 
-	/* determine whether font doesn't require encode table*/
-	l = 0;
-	for (i = 0; i < pf->size; ++i) {
-		if (pf->offset[i] != (unsigned long)l) {
-			encodetable = 1;
-			break;
-		}
-		l += BITMAP_WORDS(pf->bbx[i].w) * pf->bbx[i].h;
-	}
-	if (!encodetable) {
-		free(pf->offset);
-		pf->offset = NULL;
+		const BdfBoundingBox &bbox = font.boxes[i];
+		if (bbox.width != font.defaultBox.width
+		    || bbox.height != font.defaultBox.height
+		    || bbox.xOffset != font.defaultBox.xOffset
+		    || bbox.yOffset != font.defaultBox.yOffset)
+			hasFixedBBox = false;
 	}
 
-	/* determine whether font is fixed-width*/
-	for (i = 0; i < pf->size; ++i) {
-		if (pf->width[i] != maxwidth) {
-			proportional = 1;
-			break;
-		}
-	}
-	if (!proportional) {
-		free(pf->width);
-		pf->width = NULL;
+	if (lastCharacter == -1) {
+		warning("BdfFont::loadFont: No glyphs found");
+		delete[] font.bitmaps;
+		delete[] font.advances;
+		delete[] font.boxes;
+		return 0;
 	}
 
-	/* determine if the font needs a bbx table */
-	for (i = 0; i < pf->size; ++i) {
-		if (pf->bbx[i].w != pf->fbbw || pf->bbx[i].h != pf->fbbh || pf->bbx[i].x != pf->fbbx || pf->bbx[i].y != pf->fbby) {
-			need_bbx = 1;
-			break;
-		}
-	}
-	if (!need_bbx) {
-		free(pf->bbx);
-		pf->bbx = NULL;
+	// Free the advance table, in case all glyphs use the same advance
+	if (hasFixedAdvance) {
+		delete[] font.advances;
+		font.advances = 0;
 	}
 
-	/* reallocate bits array to actual bits used*/
-	if (ofs < pf->bits_size) {
-		bitmap_t *tmp = (bitmap_t *)realloc(pf->bits, ofs * sizeof(bitmap_t));
-		if (tmp != NULL || ofs == 0)
-			pf->bits = tmp;
-		else
-			error("bdf_read_bitmaps: Error while reallocating memory");
-		pf->bits_size = ofs;
-	} else {
-		if (ofs > pf->bits_size) {
-			warning("Warning: DWIDTH spec > max FONTBOUNDINGBOX");
-			if (ofs > pf->bits_size + EXTRA) {
-				warning("Error: Not enough bits initially allocated");
-				return 0;
-			}
-			pf->bits_size = ofs;
-		}
+	// Free the box table, in case all glyphs use the same box
+	if (hasFixedBBox) {
+		delete[] font.boxes;
+		font.boxes = 0;
 	}
 
-	return 1;
-}
+	// Adapt for the fact that we never use encoding 0.
+	if (font.defaultCharacter < firstCharacter
+	    || font.defaultCharacter > lastCharacter)
+		font.defaultCharacter = -1;
 
-/* read the next non-comment line, returns buf or NULL if EOF*/
-// TODO: Can we use SeekableReadStream::readLine instead?
-char *bdf_getline(Common::SeekableReadStream &fp, char *buf, int len) {
-	int c;
-	char *b;
-
-	for (;;) {
-		b = buf;
-		while (!fp.eos()) {
-			c = fp.readByte();
-			if (c == '\r')
-				continue;
-			if (c == '\n')
-				break;
-			if (b - buf >= (len - 1))
-				break;
-			*b++ = c;
+	font.firstCharacter = firstCharacter;
+
+	const int charsAvailable = lastCharacter - firstCharacter + 1;
+	// Try to compact the tables
+	if (charsAvailable < font.numCharacters) {
+		byte **newBitmaps = new byte *[charsAvailable];
+		boxes = 0;
+		advances = 0;
+		if (!hasFixedBBox)
+			boxes = new BdfBoundingBox[charsAvailable];
+		if (!hasFixedAdvance)
+			advances = new byte[charsAvailable];
+
+		for (int i = 0; i < charsAvailable; ++i) {
+			const int encoding = i + firstCharacter;
+			if (font.bitmaps[encoding]) {
+				newBitmaps[i] = bitmaps[encoding];
+
+				if (!hasFixedBBox)
+					boxes[i] = font.boxes[encoding];
+				if (!hasFixedAdvance)
+					advances[i] = font.advances[encoding];
+			} else {
+				newBitmaps[i] = 0;
+			}
 		}
-		*b = '\0';
-		if (fp.eos() && b == buf)
-			return NULL;
-		if (b != buf && !isprefix(buf, "COMMENT"))
-			break;
-	}
-	return buf;
-}
 
-/* return hex value of buffer */
-bitmap_t bdf_hexval(unsigned char *buf) {
-	bitmap_t val = 0;
-
-	for (unsigned char *ptr = buf; *ptr; ptr++) {
-		int c = *ptr;
-
-		if (c >= '0' && c <= '9')
-			c -= '0';
-		else if (c >= 'A' && c <= 'F')
-			c = c - 'A' + 10;
-		else if (c >= 'a' && c <= 'f')
-			c = c - 'a' + 10;
-		else
-			c = 0;
-		val = (val << 4) | c;
-	}
-	return val;
-}
+		delete[] font.bitmaps;
+		font.bitmaps = newBitmaps;
+		delete[] font.advances;
+		font.advances = advances;
+		delete[] font.boxes;
+		font.boxes = boxes;
 
-BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) {
-	BdfFontData *data = bdf_read_font(stream);
-	if (!data || stream.err()) {
-		free_font(data);
-		return 0;
+		font.numCharacters = charsAvailable;
 	}
 
-	BdfFontDesc desc;
-	desc.name = data->name;
-	desc.maxwidth = data->maxwidth;
-	desc.height = data->height;
-	desc.fbbw = data->fbbw;
-	desc.fbbh = data->fbbh;
-	desc.fbbx = data->fbbx;
-	desc.fbby = data->fbby;
-	desc.ascent = data->ascent;
-	desc.firstchar = data->firstchar;
-	desc.size = data->size;
-	desc.bits = data->bits;
-	desc.offset = data->offset;
-	desc.width = data->width;
-	desc.bbx = data->bbx;
-	desc.defaultchar = data->defaultchar;
-	desc.bits_size = data->bits_size;
-
-	return new BdfFont(desc, data);
+	return new BdfFont(font, DisposeAfterUse::YES);
 }
 
 bool BdfFont::cacheFontData(const BdfFont &font, const Common::String &filename) {
 	Common::DumpFile cacheFile;
 	if (!cacheFile.open(filename)) {
-		warning("Couldn't open file '%s' for writing", filename.c_str());
+		warning("BdfFont::cacheFontData: Couldn't open file '%s' for writing", filename.c_str());
 		return false;
 	}
 
-	cacheFile.writeUint16BE(font._desc.maxwidth);
-	cacheFile.writeUint16BE(font._desc.height);
-	cacheFile.writeUint16BE(font._desc.fbbw);
-	cacheFile.writeUint16BE(font._desc.fbbh);
-	cacheFile.writeSint16BE(font._desc.fbbx);
-	cacheFile.writeSint16BE(font._desc.fbby);
-	cacheFile.writeUint16BE(font._desc.ascent);
-	cacheFile.writeUint16BE(font._desc.firstchar);
-	cacheFile.writeUint16BE(font._desc.size);
-	cacheFile.writeUint16BE(font._desc.defaultchar);
-	cacheFile.writeUint32BE(font._desc.bits_size);
-
-	for (long i = 0; i < font._desc.bits_size; ++i) {
-		cacheFile.writeUint16BE(font._desc.bits[i]);
-	}
-
-	if (font._desc.offset) {
-		cacheFile.writeByte(1);
-		for (int i = 0; i < font._desc.size; ++i) {
-			cacheFile.writeUint32BE(font._desc.offset[i]);
+	const BdfFontData &data = font._data;
+
+	cacheFile.writeUint32BE(MKTAG('S', 'V', 'F', 'C'));
+	cacheFile.writeUint32BE(1);
+	cacheFile.writeUint16BE(data.maxAdvance);
+	cacheFile.writeByte(data.height);
+	cacheFile.writeByte(data.defaultBox.width);
+	cacheFile.writeByte(data.defaultBox.height);
+	cacheFile.writeSByte(data.defaultBox.xOffset);
+	cacheFile.writeSByte(data.defaultBox.yOffset);
+	cacheFile.writeByte(data.ascent);
+	cacheFile.writeUint16BE(data.firstCharacter);
+	cacheFile.writeSint16BE(data.defaultCharacter);
+	cacheFile.writeUint16BE(data.numCharacters);
+
+	for (int i = 0; i < data.numCharacters; ++i) {
+		const BdfBoundingBox &box = data.boxes ? data.boxes[i] : data.defaultBox;
+		if (data.bitmaps[i]) {
+			const int bytes = ((box.width + 7) / 8) * box.height;
+			cacheFile.writeUint32BE(bytes);
+			cacheFile.write(data.bitmaps[i], bytes);
+		} else {
+			cacheFile.writeUint32BE(0);
 		}
-	} else {
-		cacheFile.writeByte(0);
 	}
 
-	if (font._desc.width) {
-		cacheFile.writeByte(1);
-		for (int i = 0; i < font._desc.size; ++i) {
-			cacheFile.writeByte(font._desc.width[i]);
-		}
+	if (data.advances) {
+		cacheFile.writeByte(0xFF);
+		cacheFile.write(data.advances, data.numCharacters);
 	} else {
-		cacheFile.writeByte(0);
+		cacheFile.writeByte(0x00);
 	}
 
-	if (font._desc.bbx) {
-		cacheFile.writeByte(1);
-		for (int i = 0; i < font._desc.size; ++i) {
-			cacheFile.writeByte(font._desc.bbx[i].w);
-			cacheFile.writeByte(font._desc.bbx[i].h);
-			cacheFile.writeByte(font._desc.bbx[i].x);
-			cacheFile.writeByte(font._desc.bbx[i].y);
+	if (data.boxes) {
+		cacheFile.writeByte(0xFF);
+
+		for (int i = 0; i < data.numCharacters; ++i) {
+			const BdfBoundingBox &box = data.boxes[i];
+			cacheFile.writeByte(box.width);
+			cacheFile.writeByte(box.height);
+			cacheFile.writeSByte(box.xOffset);
+			cacheFile.writeSByte(box.yOffset);
 		}
 	} else {
-		cacheFile.writeByte(0);
+		cacheFile.writeByte(0x00);
 	}
 
 	return !cacheFile.err();
 }
 
 BdfFont *BdfFont::loadFromCache(Common::SeekableReadStream &stream) {
-	BdfFont *font = 0;
-
-	BdfFontData *data = (BdfFontData *)malloc(sizeof(BdfFontData));
-	if (!data)
+	const uint32 magic = stream.readUint32BE();
+	if (magic != MKTAG('S', 'V', 'F', 'C'))
 		return 0;
 
-	memset(data, 0, sizeof(BdfFontData));
-
-	data->maxwidth = stream.readUint16BE();
-	data->height = stream.readUint16BE();
-	data->fbbw = stream.readUint16BE();
-	data->fbbh = stream.readUint16BE();
-	data->fbbx = stream.readSint16BE();
-	data->fbby = stream.readSint16BE();
-	data->ascent = stream.readUint16BE();
-	data->firstchar = stream.readUint16BE();
-	data->size = stream.readUint16BE();
-	data->defaultchar = stream.readUint16BE();
-	data->bits_size = stream.readUint32BE();
-
-	data->bits = (bitmap_t *)malloc(sizeof(bitmap_t) * data->bits_size);
-	if (!data->bits) {
-		free(data);
+	const uint32 version = stream.readUint32BE();
+	if (version != 1)
 		return 0;
-	}
 
-	for (long i = 0; i < data->bits_size; ++i) {
-		data->bits[i] = stream.readUint16BE();
-	}
+	BdfFontData data;
 
-	bool hasOffsetTable = (stream.readByte() != 0);
-	if (hasOffsetTable) {
-		data->offset = (unsigned long *)malloc(sizeof(unsigned long) * data->size);
-		if (!data->offset) {
-			free(data->bits);
-			free(data);
-			return 0;
-		}
+	data.maxAdvance = stream.readUint16BE();
+	data.height = stream.readByte();
+	data.defaultBox.width = stream.readByte();
+	data.defaultBox.height = stream.readByte();
+	data.defaultBox.xOffset = stream.readSByte();
+	data.defaultBox.yOffset = stream.readSByte();
+	data.ascent = stream.readByte();
+	data.firstCharacter = stream.readUint16BE();
+	data.defaultCharacter = stream.readSint16BE();
+	data.numCharacters = stream.readUint16BE();
 
-		for (int i = 0; i < data->size; ++i) {
-			data->offset[i] = stream.readUint32BE();
-		}
-	}
+	if (stream.err() || stream.eos())
+		return 0;
+
+	byte **bitmaps = new byte *[data.numCharacters];
+	byte *advances = 0;
+	BdfBoundingBox *boxes = 0;
+	for (int i = 0; i < data.numCharacters; ++i) {
+		uint32 size = stream.readUint32BE();
 
-	bool hasWidthTable = (stream.readByte() != 0);
-	if (hasWidthTable) {
-		data->width = (unsigned char *)malloc(sizeof(unsigned char) * data->size);
-		if (!data->width) {
-			free(data->bits);
-			free(data->offset);
-			free(data);
+		if (stream.err() || stream.eos()) {
+			for (int j = 0; j < i; ++j)
+				delete[] bitmaps[i];
+			delete[] bitmaps;
 			return 0;
 		}
 
-		for (int i = 0; i < data->size; ++i) {
-			data->width[i] = stream.readByte();
+		if (size) {
+			bitmaps[i] = new byte[size];
+			stream.read(bitmaps[i], size);
+		} else {
+			bitmaps[i] = 0;
 		}
 	}
 
-	bool hasBBXTable = (stream.readByte() != 0);
-	if (hasBBXTable) {
-		data->bbx = (BBX *)malloc(sizeof(BBX) * data->size);
-		if (!data->bbx) {
-			free(data->bits);
-			free(data->offset);
-			free(data->width);
-			free(data);
-			return 0;
-		}
 
-		for (int i = 0; i < data->size; ++i) {
-			data->bbx[i].w = (int8)stream.readByte();
-			data->bbx[i].h = (int8)stream.readByte();
-			data->bbx[i].x = (int8)stream.readByte();
-			data->bbx[i].y = (int8)stream.readByte();
-		}
+	if (stream.readByte() == 0xFF) {
+		advances = new byte[data.numCharacters];
+		stream.read(advances, data.numCharacters);
 	}
 
-	if (stream.err() || stream.eos()) {
-		free(data->bits);
-		free(data->offset);
-		free(data->width);
-		free(data);
-		return 0;
+	if (stream.readByte() == 0xFF) {
+		boxes = new BdfBoundingBox[data.numCharacters];
+		for (int i = 0; i < data.numCharacters; ++i) {
+			boxes[i].width = stream.readByte();
+			boxes[i].height = stream.readByte();
+			boxes[i].xOffset = stream.readSByte();
+			boxes[i].yOffset = stream.readSByte();
+		}
 	}
 
-	BdfFontDesc desc;
-	desc.name = data->name;
-	desc.maxwidth = data->maxwidth;
-	desc.height = data->height;
-	desc.fbbw = data->fbbw;
-	desc.fbbh = data->fbbh;
-	desc.fbbx = data->fbbx;
-	desc.fbby = data->fbby;
-	desc.ascent = data->ascent;
-	desc.firstchar = data->firstchar;
-	desc.size = data->size;
-	desc.bits = data->bits;
-	desc.offset = data->offset;
-	desc.width = data->width;
-	desc.bbx = data->bbx;
-	desc.defaultchar = data->defaultchar;
-	desc.bits_size = data->bits_size;
-
-	font = new BdfFont(desc, data);
-	if (!font) {
-		free(data->bits);
-		free(data->offset);
-		free(data->width);
-		free(data);
-		return 0;
+	if (stream.eos() || stream.err()) {
+		for (int i = 0; i < data.numCharacters; ++i)
+			delete[] bitmaps[i];
+		delete[] bitmaps;
+		delete[] advances;
+		delete[] boxes;
 	}
 
-	return font;
+	data.bitmaps = bitmaps;
+	data.advances = advances;
+	data.boxes = boxes;
+	return new BdfFont(data, DisposeAfterUse::YES);
 }
 
 } // End of namespace Graphics
diff --git a/graphics/fonts/bdf.h b/graphics/fonts/bdf.h
index 0d60693..5b615cc 100644
--- a/graphics/fonts/bdf.h
+++ b/graphics/fonts/bdf.h
@@ -23,6 +23,7 @@
 #define GRAPHICS_FONTS_BDF_H
 
 #include "common/system.h"
+#include "common/types.h"
 
 #include "graphics/font.h"
 
@@ -32,42 +33,29 @@ class SeekableReadStream;
 
 namespace Graphics {
 
-typedef uint16 bitmap_t; /* bitmap image unit size*/
-
-struct BBX {
-	int8 w;
-	int8 h;
-	int8 x;
-	int8 y;
+struct BdfBoundingBox {
+	uint8 width, height;
+	int8 xOffset, yOffset;
 };
 
-/* builtin C-based proportional/fixed font structure */
-/* based on The Microwindows Project http://microwindows.org */
-struct BdfFontDesc {
-	const char          *name;                  /* font name */
-	int                 maxwidth;               /* max width in pixels */
-	int                 height;                 /* height in pixels */
-	int                 fbbw, fbbh, fbbx, fbby; /* max bounding box */
-	int                 ascent;                 /* ascent (baseline) height */
-	int                 firstchar;              /* first character in bitmap */
-	int                 size;                   /* font size in glyphs */
-	const bitmap_t      *bits;                  /* 16-bit right-padded bitmap data */
-	const unsigned long *offset;                /* offsets into bitmap data */
-	const unsigned char *width;                 /* character widths or NULL if fixed */
-	const BBX           *bbx;                   /* character bounding box or NULL if fixed */
-	int                 defaultchar;            /* default char (not glyph index) */
-	long                bits_size;              /* # words of bitmap_t bits */
-};
+struct BdfFontData {
+	int maxAdvance;
+	int height;
+	BdfBoundingBox defaultBox;
+	int ascent;
 
-struct BdfFontData;
+	int firstCharacter;
+	int defaultCharacter;
+	int numCharacters;
 
-class BdfFont : public Font {
-protected:
-	BdfFontDesc _desc;
-	BdfFontData *_font;
+	const byte *const *bitmaps;
+	const byte *advances;
+	const BdfBoundingBox *boxes;
+};
 
+class BdfFont : public Font {
 public:
-	BdfFont(const BdfFontDesc &desc, BdfFontData *font = 0) : _desc(desc), _font(font) {}
+	BdfFont(const BdfFontData &data, DisposeAfterUse::Flag dispose);
 	~BdfFont();
 
 	virtual int getFontHeight() const;
@@ -79,12 +67,17 @@ public:
 	static BdfFont *loadFont(Common::SeekableReadStream &stream);
 	static bool cacheFontData(const BdfFont &font, const Common::String &filename);
 	static BdfFont *loadFromCache(Common::SeekableReadStream &stream);
+private:
+	int mapToIndex(byte ch) const;
+
+	const BdfFontData _data;
+	const DisposeAfterUse::Flag _dispose;
 };
 
 #define DEFINE_FONT(n) \
 	const BdfFont *n = 0;   \
 	void create_##n() { \
-		n = new BdfFont(desc);  \
+		n = new BdfFont(desc, DisposeAfterUse::YES);  \
 	}
 
 #define FORWARD_DECLARE_FONT(n) \
diff --git a/graphics/fonts/consolefont.cpp b/graphics/fonts/consolefont.cpp
index 5b47683..8244d75 100644
--- a/graphics/fonts/consolefont.cpp
+++ b/graphics/fonts/consolefont.cpp
@@ -1,5654 +1,5867 @@
-/* Generated by convbdf on Sat Jun 17 01:37:46 2006. */
+// Generated by convbdf on Fri Jan  6 14:32:21 2012
 #include "graphics/fonts/bdf.h"
 
-/* Font information:
-   name: 5x8-L1
-   facename: -Misc-Fixed-Medium-R-Normal--8-80-75-75-C-50-ISO8859-1
-   w x h: 5x8
-   bbx: 5 8 0 -1
-   size: 256
-   ascent: 7
-   descent: 1
-   first char: 0 (0x00)
-   last char: 255 (0xff)
-   default char: 0 (0x00)
-   proportional: no
-   Public domain font.  Share and enjoy.
-*/
+// Font information: 
+//  Name: -Misc-Fixed-Medium-R-Normal--8-80-75-75-C-50-ISO8859-1
+//  Size: 5x8
+//  Box: 5 8 0 -1
+//  Ascent: 7
+//  First character: 0
+//  Default character: 0
+//  Characters: 256
+//  Copyright: "Public domain font.  Share and enjoy."
 
 namespace Graphics {
 
-/* Font character bitmap data. */
-static const bitmap_t _font_bits[] = {
-
-/* Character 0 (0x00):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |* *  |
-   |   * |
-   |*    |
-   |   * |
-   |*    |
-   | * * |
-   |     |
-   +-----+
-*/
-0x0000,
-0xa000,
-0x1000,
-0x8000,
-0x1000,
-0x8000,
-0x5000,
-0x0000,
-
-/* Character 1 (0x01):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   | *** |
-   |*****|
-   | *** |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0x7000,
-0xf800,
-0x7000,
-0x2000,
-0x0000,
-
-/* Character 2 (0x02):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* * *|
-   | * * |
-   |* * *|
-   | * * |
-   |* * *|
-   | * * |
-   |* * *|
-   +-----+
-*/
-0x5000,
-0xa800,
-0x5000,
-0xa800,
-0x5000,
-0xa800,
-0x5000,
-0xa800,
-
-/* Character 3 (0x03):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |* *  |
-   |* *  |
-   |***  |
-   |* *  |
-   |* *  |
-   | *** |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0xa000,
-0xa000,
-0xe000,
-0xa000,
-0xa000,
-0x7000,
-0x2000,
-0x2000,
-
-/* Character 4 (0x04):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |***  |
-   |*    |
-   |**   |
-   |* ***|
-   |* *  |
-   |  ** |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0xe000,
-0x8000,
-0xc000,
-0xb800,
-0xa000,
-0x3000,
-0x2000,
-0x2000,
-
-/* Character 5 (0x05):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*    |
-   |*    |
-   | **  |
-   |  ** |
-   |  * *|
-   |  ** |
-   |  * *|
-   +-----+
-*/
-0x6000,
-0x8000,
-0x8000,
-0x6000,
-0x3000,
-0x2800,
-0x3000,
-0x2800,
-
-/* Character 6 (0x06):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*    |
-   |*    |
-   |*    |
-   |***  |
-   |  ***|
-   |  *  |
-   |  ** |
-   |  *  |
-   +-----+
-*/
-0x8000,
-0x8000,
-0x8000,
-0xe000,
-0x3800,
-0x2000,
-0x3000,
-0x2000,
-
-/* Character 7 (0x07):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   |  *  |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0x2000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 8 (0x08):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   | *** |
-   |  *  |
-   |     |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0x7000,
-0x2000,
-0x0000,
-0x7000,
-0x0000,
-
-/* Character 9 (0x09):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*  * |
-   |** * |
-   |* ** |
-   |*  * |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  ***|
-   +-----+
-*/
-0x9000,
-0xd000,
-0xb000,
-0x9000,
-0x2000,
-0x2000,
-0x2000,
-0x3800,
-
-/* Character 10 (0x0a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |* *  |
-   |* *  |
-   |* *  |
-   | *   |
-   |  ***|
-   |   * |
-   |   * |
-   |   * |
-   +-----+
-*/
-0xa000,
-0xa000,
-0xa000,
-0x4000,
-0x3800,
-0x1000,
-0x1000,
-0x1000,
-
-/* Character 11 (0x0b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |***  |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0xe000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 12 (0x0c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |***  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xe000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 13 (0x0d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |  ***|
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x3800,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 14 (0x0e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |  ***|
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0x3800,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 15 (0x0f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |*****|
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0xf800,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 16 (0x10):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*****|
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0xf800,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 17 (0x11):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*****|
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf800,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 18 (0x12):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*****|
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xf800,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 19 (0x13):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |*****|
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0xf800,
-0x0000,
-
-/* Character 20 (0x14):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |*****|
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0xf800,
-
-/* Character 21 (0x15):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |  ***|
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0x3800,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 22 (0x16):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |***  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0xe000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 23 (0x17):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |*****|
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0xf800,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 24 (0x18):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*****|
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xf800,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 25 (0x19):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-
-/* Character 26 (0x1a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |   * |
-   |  *  |
-   | *   |
-   |  *  |
-   |   * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x1000,
-0x2000,
-0x4000,
-0x2000,
-0x1000,
-0x7000,
-0x0000,
-
-/* Character 27 (0x1b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *   |
-   |  *  |
-   |   * |
-   |  *  |
-   | *   |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x4000,
-0x2000,
-0x1000,
-0x2000,
-0x4000,
-0x7000,
-0x0000,
-
-/* Character 28 (0x1c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*****|
-   | * * |
-   | * * |
-   | * * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xf800,
-0x5000,
-0x5000,
-0x5000,
-0x0000,
-
-/* Character 29 (0x1d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   |**** |
-   | **  |
-   |**** |
-   | *   |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0xf000,
-0x6000,
-0xf000,
-0x4000,
-0x0000,
-
-/* Character 30 (0x1e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   |***  |
-   | *   |
-   | * * |
-   |* *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0xe000,
-0x4000,
-0x5000,
-0xa000,
-0x0000,
-
-/* Character 31 (0x1f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |  *  |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x2000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 32 (0x20):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 33 (0x21):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-0x2000,
-0x0000,
-
-/* Character 34 (0x22):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | * * |
-   | * * |
-   | * * |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x5000,
-0x5000,
-0x5000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 35 (0x23):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   | * * |
-   |*****|
-   | * * |
-   |*****|
-   | * * |
-   | * * |
-   |     |
-   +-----+
-*/
-0x5000,
-0x5000,
-0xf800,
-0x5000,
-0xf800,
-0x5000,
-0x5000,
-0x0000,
-
-/* Character 36 (0x24):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *** |
-   |* *  |
-   | *** |
-   |  * *|
-   | *** |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x2000,
-0x7000,
-0xa000,
-0x7000,
-0x2800,
-0x7000,
-0x2000,
-0x0000,
-
-/* Character 37 (0x25):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *   |
-   | * * |
-   |  *  |
-   | * * |
-   |   * |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x4000,
-0x5000,
-0x2000,
-0x5000,
-0x1000,
-0x0000,
-0x0000,
-
-/* Character 38 (0x26):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |* *  |
-   |* *  |
-   | *   |
-   |* *  |
-   |* *  |
-   | * * |
-   |     |
-   +-----+
-*/
-0x4000,
-0xa000,
-0xa000,
-0x4000,
-0xa000,
-0xa000,
-0x5000,
-0x0000,
-
-/* Character 39 (0x27):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 40 (0x28):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | *   |
-   | *   |
-   | *   |
-   | *   |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x4000,
-0x4000,
-0x4000,
-0x4000,
-0x2000,
-0x0000,
-
-/* Character 41 (0x29):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *   |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *   |
-   |     |
-   +-----+
-*/
-0x0000,
-0x4000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x4000,
-0x0000,
-
-/* Character 42 (0x2a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |*  * |
-   | **  |
-   |**** |
-   | **  |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x9000,
-0x6000,
-0xf000,
-0x6000,
-0x9000,
-0x0000,
-
-/* Character 43 (0x2b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   |  *  |
-   |*****|
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0x2000,
-0xf800,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 44 (0x2c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |  ** |
-   |  *  |
-   | *   |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x3000,
-0x2000,
-0x4000,
-
-/* Character 45 (0x2d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |**** |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0xf000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 46 (0x2e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |  *  |
-   | *** |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x2000,
-0x7000,
-0x2000,
-
-/* Character 47 (0x2f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |   * |
-   |   * |
-   |  *  |
-   | *   |
-   |*    |
-   |*    |
-   |     |
-   +-----+
-*/
-0x0000,
-0x1000,
-0x1000,
-0x2000,
-0x4000,
-0x8000,
-0x8000,
-0x0000,
-
-/* Character 48 (0x30):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   | * * |
-   | * * |
-   | * * |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0x5000,
-0x5000,
-0x5000,
-0x2000,
-0x0000,
-
-/* Character 49 (0x31):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | **  |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x6000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 50 (0x32):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |   * |
-   | **  |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x1000,
-0x6000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 51 (0x33):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |**** |
-   |  *  |
-   | **  |
-   |   * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf000,
-0x2000,
-0x6000,
-0x1000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 52 (0x34):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | **  |
-   |* *  |
-   |**** |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x6000,
-0xa000,
-0xf000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 53 (0x35):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |**** |
-   |*    |
-   |***  |
-   |   * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf000,
-0x8000,
-0xe000,
-0x1000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 54 (0x36):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*    |
-   |***  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x8000,
-0xe000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 55 (0x37):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |**** |
-   |   * |
-   |  *  |
-   |  *  |
-   | *   |
-   | *   |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf000,
-0x1000,
-0x2000,
-0x2000,
-0x4000,
-0x4000,
-0x0000,
-
-/* Character 56 (0x38):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 57 (0x39):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | *** |
-   |   * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x7000,
-0x1000,
-0x6000,
-0x0000,
-
-/* Character 58 (0x3a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   | **  |
-   | **  |
-   |     |
-   | **  |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x6000,
-0x6000,
-0x0000,
-0x6000,
-0x6000,
-0x0000,
-
-/* Character 59 (0x3b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  ** |
-   |  ** |
-   |     |
-   |  ** |
-   |  *  |
-   | *   |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x3000,
-0x3000,
-0x0000,
-0x3000,
-0x2000,
-0x4000,
-
-/* Character 60 (0x3c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |   * |
-   |  *  |
-   | *   |
-   | *   |
-   |  *  |
-   |   * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x1000,
-0x2000,
-0x4000,
-0x4000,
-0x2000,
-0x1000,
-0x0000,
-
-/* Character 61 (0x3d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |**** |
-   |     |
-   |**** |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xf000,
-0x0000,
-0xf000,
-0x0000,
-0x0000,
-
-/* Character 62 (0x3e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *   |
-   |  *  |
-   |   * |
-   |   * |
-   |  *  |
-   | *   |
-   |     |
-   +-----+
-*/
-0x0000,
-0x4000,
-0x2000,
-0x1000,
-0x1000,
-0x2000,
-0x4000,
-0x0000,
-
-/* Character 63 (0x3f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   |   * |
-   |  *  |
-   |     |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0x1000,
-0x2000,
-0x0000,
-0x2000,
-0x0000,
-
-/* Character 64 (0x40):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  ** |
-   | *  *|
-   |*  **|
-   |* * *|
-   |* * *|
-   |*  * |
-   | *   |
-   |  ** |
-   +-----+
-*/
-0x3000,
-0x4800,
-0x9800,
-0xa800,
-0xa800,
-0x9000,
-0x4000,
-0x3000,
-
-/* Character 65 (0x41):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 66 (0x42):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |***  |
-   |*  * |
-   |***  |
-   |*  * |
-   |*  * |
-   |***  |
-   |     |
-   +-----+
-*/
-0x0000,
-0xe000,
-0x9000,
-0xe000,
-0x9000,
-0x9000,
-0xe000,
-0x0000,
-
-/* Character 67 (0x43):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*    |
-   |*    |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x8000,
-0x8000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 68 (0x44):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |***  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   |***  |
-   |     |
-   +-----+
-*/
-0x0000,
-0xe000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0xe000,
-0x0000,
-
-/* Character 69 (0x45):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |**** |
-   |*    |
-   |***  |
-   |*    |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf000,
-0x8000,
-0xe000,
-0x8000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 70 (0x46):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |**** |
-   |*    |
-   |***  |
-   |*    |
-   |*    |
-   |*    |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf000,
-0x8000,
-0xe000,
-0x8000,
-0x8000,
-0x8000,
-0x0000,
-
-/* Character 71 (0x47):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*    |
-   |* ** |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x8000,
-0xb000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 72 (0x48):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 73 (0x49):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 74 (0x4a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   |* *  |
-   | *   |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0xa000,
-0x4000,
-0x0000,
-
-/* Character 75 (0x4b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |* *  |
-   |**   |
-   |* *  |
-   |* *  |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0xa000,
-0xc000,
-0xa000,
-0xa000,
-0x9000,
-0x0000,
-
-/* Character 76 (0x4c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |*    |
-   |*    |
-   |*    |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8000,
-0x8000,
-0x8000,
-0x8000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 77 (0x4d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |**** |
-   |**** |
-   |*  * |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0xf000,
-0xf000,
-0x9000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 78 (0x4e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |** * |
-   |**** |
-   |* ** |
-   |* ** |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0xd000,
-0xf000,
-0xb000,
-0xb000,
-0x9000,
-0x0000,
-
-/* Character 79 (0x4f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 80 (0x50):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |***  |
-   |*  * |
-   |*  * |
-   |***  |
-   |*    |
-   |*    |
-   |     |
-   +-----+
-*/
-0x0000,
-0xe000,
-0x9000,
-0x9000,
-0xe000,
-0x8000,
-0x8000,
-0x0000,
-
-/* Character 81 (0x51):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   |** * |
-   |* ** |
-   | **  |
-   |   * |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0xd000,
-0xb000,
-0x6000,
-0x1000,
-
-/* Character 82 (0x52):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |***  |
-   |*  * |
-   |*  * |
-   |***  |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0xe000,
-0x9000,
-0x9000,
-0xe000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 83 (0x53):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   | *   |
-   |  *  |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x4000,
-0x2000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 84 (0x54):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 85 (0x55):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 86 (0x56):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x6000,
-0x0000,
-
-/* Character 87 (0x57):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   |**** |
-   |**** |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0xf000,
-0xf000,
-0x9000,
-0x0000,
-
-/* Character 88 (0x58):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |*  * |
-   | **  |
-   | **  |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x9000,
-0x6000,
-0x6000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 89 (0x59):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*   *|
-   |*   *|
-   | * * |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8800,
-0x8800,
-0x5000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 90 (0x5a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |**** |
-   |   * |
-   |  *  |
-   | *   |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x0000,
-0xf000,
-0x1000,
-0x2000,
-0x4000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 91 (0x5b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   | *   |
-   | *   |
-   | *   |
-   | *   |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x4000,
-0x4000,
-0x4000,
-0x4000,
-0x7000,
-0x0000,
-
-/* Character 92 (0x5c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |*    |
-   | *   |
-   |  *  |
-   |   * |
-   |   * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8000,
-0x8000,
-0x4000,
-0x2000,
-0x1000,
-0x1000,
-0x0000,
-
-/* Character 93 (0x5d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |   * |
-   |   * |
-   |   * |
-   |   * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x1000,
-0x1000,
-0x1000,
-0x1000,
-0x7000,
-0x0000,
-
-/* Character 94 (0x5e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 95 (0x5f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |**** |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0xf000,
-
-/* Character 96 (0x60):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *   |
-   |  *  |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x4000,
-0x2000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 97 (0x61):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 98 (0x62):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |*    |
-   |***  |
-   |*  * |
-   |*  * |
-   |***  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8000,
-0x8000,
-0xe000,
-0x9000,
-0x9000,
-0xe000,
-0x0000,
-
-/* Character 99 (0x63):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |  ** |
-   | *   |
-   | *   |
-   |  ** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x3000,
-0x4000,
-0x4000,
-0x3000,
-0x0000,
-
-/* Character 100 (0x64):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |   * |
-   |   * |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x1000,
-0x1000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 101 (0x65):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | **  |
-   |* ** |
-   |**   |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x6000,
-0xb000,
-0xc000,
-0x6000,
-0x0000,
-
-/* Character 102 (0x66):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   | *   |
-   |***  |
-   | *   |
-   | *   |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0x4000,
-0xe000,
-0x4000,
-0x4000,
-0x0000,
-
-/* Character 103 (0x67):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | **  |
-   |*  * |
-   | *** |
-   |   * |
-   | **  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x6000,
-0x9000,
-0x7000,
-0x1000,
-0x6000,
-
-/* Character 104 (0x68):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |*    |
-   |***  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8000,
-0x8000,
-0xe000,
-0x9000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 105 (0x69):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   |     |
-   | **  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x0000,
-0x6000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 106 (0x6a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |   * |
-   |     |
-   |   * |
-   |   * |
-   |   * |
-   | * * |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x1000,
-0x0000,
-0x1000,
-0x1000,
-0x1000,
-0x5000,
-0x2000,
-
-/* Character 107 (0x6b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |*    |
-   |*  * |
-   |***  |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8000,
-0x8000,
-0x9000,
-0xe000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 108 (0x6c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 109 (0x6d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |** * |
-   |* * *|
-   |* * *|
-   |* * *|
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xd000,
-0xa800,
-0xa800,
-0xa800,
-0x0000,
-
-/* Character 110 (0x6e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |***  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xe000,
-0x9000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 111 (0x6f):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 112 (0x70):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |***  |
-   |*  * |
-   |***  |
-   |*    |
-   |*    |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xe000,
-0x9000,
-0xe000,
-0x8000,
-0x8000,
-
-/* Character 113 (0x71):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | *** |
-   |*  * |
-   | *** |
-   |   * |
-   |   * |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x7000,
-0x9000,
-0x7000,
-0x1000,
-0x1000,
-
-/* Character 114 (0x72):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |* *  |
-   |** * |
-   |*    |
-   |*    |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xa000,
-0xd000,
-0x8000,
-0x8000,
-0x0000,
-
-/* Character 115 (0x73):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |  ** |
-   | **  |
-   |   * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x3000,
-0x6000,
-0x1000,
-0x6000,
-0x0000,
-
-/* Character 116 (0x74):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *   |
-   | *   |
-   |***  |
-   | *   |
-   | * * |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x4000,
-0x4000,
-0xe000,
-0x4000,
-0x5000,
-0x2000,
-0x0000,
-
-/* Character 117 (0x75):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 118 (0x76):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | * * |
-   | * * |
-   | * * |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x5000,
-0x5000,
-0x5000,
-0x2000,
-0x0000,
-
-/* Character 119 (0x77):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*   *|
-   |* * *|
-   |* * *|
-   | * * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x8800,
-0xa800,
-0xa800,
-0x5000,
-0x0000,
-
-/* Character 120 (0x78):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*  * |
-   | **  |
-   | **  |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x9000,
-0x6000,
-0x6000,
-0x9000,
-0x0000,
-
-/* Character 121 (0x79):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*  * |
-   |*  * |
-   | *** |
-   |*  * |
-   | **  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x9000,
-0x9000,
-0x7000,
-0x9000,
-0x6000,
-
-/* Character 122 (0x7a):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |**** |
-   |  *  |
-   | *   |
-   |**** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xf000,
-0x2000,
-0x4000,
-0xf000,
-0x0000,
-
-/* Character 123 (0x7b):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  ** |
-   | *   |
-   |  *  |
-   |**   |
-   |  *  |
-   | *   |
-   |  ** |
-   |     |
-   +-----+
-*/
-0x3000,
-0x4000,
-0x2000,
-0xc000,
-0x2000,
-0x4000,
-0x3000,
-0x0000,
-
-/* Character 124 (0x7c):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 125 (0x7d):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |**   |
-   |  *  |
-   | *   |
-   |  ** |
-   | *   |
-   |  *  |
-   |**   |
-   |     |
-   +-----+
-*/
-0xc000,
-0x2000,
-0x4000,
-0x3000,
-0x4000,
-0x2000,
-0xc000,
-0x0000,
-
-/* Character 126 (0x7e):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | * * |
-   |* *  |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x5000,
-0xa000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 160 (0xa0):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 161 (0xa1):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   |     |
-   |  *  |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x0000,
-0x2000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 162 (0xa2):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   | *** |
-   |* *  |
-   |* *  |
-   | *** |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0x7000,
-0xa000,
-0xa000,
-0x7000,
-0x2000,
-
-/* Character 163 (0xa3):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   |***  |
-   | *   |
-   | * * |
-   |* *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0xe000,
-0x4000,
-0x5000,
-0xa000,
-0x0000,
-
-/* Character 164 (0xa4):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |*   *|
-   | *** |
-   | * * |
-   | *** |
-   |*   *|
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x8800,
-0x7000,
-0x5000,
-0x7000,
-0x8800,
-0x0000,
-
-/* Character 165 (0xa5):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*   *|
-   | * * |
-   |*****|
-   |  *  |
-   |*****|
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8800,
-0x5000,
-0xf800,
-0x2000,
-0xf800,
-0x2000,
-0x0000,
-
-/* Character 166 (0xa6):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 167 (0xa7):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *** |
-   |*    |
-   |***  |
-   |*  * |
-   | *** |
-   |   * |
-   |***  |
-   |     |
-   +-----+
-*/
-0x7000,
-0x8000,
-0xe000,
-0x9000,
-0x7000,
-0x1000,
-0xe000,
-0x0000,
-
-/* Character 168 (0xa8):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | * * |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x5000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 169 (0xa9):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |* * *|
-   |**  *|
-   |**  *|
-   |* * *|
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0xa800,
-0xc800,
-0xc800,
-0xa800,
-0x7000,
-0x0000,
-
-/* Character 170 (0xaa):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  ** |
-   | * * |
-   |  ** |
-   |     |
-   | *** |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x3000,
-0x5000,
-0x3000,
-0x0000,
-0x7000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 171 (0xab):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | * * |
-   |* *  |
-   | * * |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x5000,
-0xa000,
-0x5000,
-0x0000,
-0x0000,
-
-/* Character 172 (0xac):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   | *** |
-   |   * |
-   |   * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x7000,
-0x1000,
-0x1000,
-0x0000,
-
-/* Character 173 (0xad):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   | *** |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x7000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 174 (0xae):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |*** *|
-   |** **|
-   |*** *|
-   |** **|
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0xe800,
-0xd800,
-0xe800,
-0xd800,
-0x7000,
-0x0000,
-
-/* Character 175 (0xaf):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 176 (0xb0):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | * * |
-   |  *  |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x5000,
-0x2000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 177 (0xb1):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   | *** |
-   |  *  |
-   |     |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0x7000,
-0x2000,
-0x0000,
-0x7000,
-0x0000,
-
-/* Character 178 (0xb2):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | * * |
-   |   * |
-   |  *  |
-   | *** |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x2000,
-0x5000,
-0x1000,
-0x2000,
-0x7000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 179 (0xb3):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |   * |
-   | **  |
-   |   * |
-   | **  |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x6000,
-0x1000,
-0x6000,
-0x1000,
-0x6000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 180 (0xb4):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   | *   |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x4000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 181 (0xb5):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   |***  |
-   |*    |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0xe000,
-0x8000,
-
-/* Character 182 (0xb6):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | ****|
-   |*** *|
-   |*** *|
-   | ** *|
-   |  * *|
-   |  * *|
-   |     |
-   +-----+
-*/
-0x0000,
-0x7800,
-0xe800,
-0xe800,
-0x6800,
-0x2800,
-0x2800,
-0x0000,
-
-/* Character 183 (0xb7):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |  *  |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x2000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 184 (0xb8):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |     |
-   |  *  |
-   | *   |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x2000,
-0x4000,
-
-/* Character 185 (0xb9):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | **  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x2000,
-0x6000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 186 (0xba):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | * * |
-   |  *  |
-   |     |
-   | *** |
-   |     |
-   |     |
-   |     |
-   +-----+
-*/
-0x2000,
-0x5000,
-0x2000,
-0x0000,
-0x7000,
-0x0000,
-0x0000,
-0x0000,
-
-/* Character 187 (0xbb):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |* *  |
-   | * * |
-   |* *  |
-   |     |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xa000,
-0x5000,
-0xa000,
-0x0000,
-0x0000,
-
-/* Character 188 (0xbc):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*    |
-   |*    |
-   |*    |
-   |* *  |
-   | **  |
-   |**** |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x8000,
-0x8000,
-0x8000,
-0xa000,
-0x6000,
-0xf000,
-0x2000,
-0x0000,
-
-/* Character 189 (0xbd):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*    |
-   |*    |
-   |* *  |
-   |** * |
-   |   * |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x8000,
-0x8000,
-0xa000,
-0xd000,
-0x1000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 190 (0xbe):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*    |
-   | *   |
-   |*    |
-   | **  |
-   |* *  |
-   |**** |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x8000,
-0x4000,
-0x8000,
-0x6000,
-0xa000,
-0xf000,
-0x2000,
-0x0000,
-
-/* Character 191 (0xbf):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |  *  |
-   |     |
-   |  *  |
-   | *   |
-   | * * |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x2000,
-0x0000,
-0x2000,
-0x4000,
-0x5000,
-0x2000,
-0x0000,
-
-/* Character 192 (0xc0):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   | **  |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x6000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 193 (0xc1):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   | **  |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x6000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 194 (0xc2):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   | **  |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x6000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 195 (0xc3):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* *  |
-   | **  |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x5000,
-0xa000,
-0x6000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 196 (0xc4):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*  * |
-   |     |
-   | **  |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x9000,
-0x0000,
-0x6000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 197 (0xc5):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   | **  |
-   |*  * |
-   |**** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x6000,
-0x9000,
-0xf000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 198 (0xc6):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |* *  |
-   |* *  |
-   |**** |
-   |* *  |
-   |* ** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0xa000,
-0xa000,
-0xf000,
-0xa000,
-0xb000,
-0x0000,
-
-/* Character 199 (0xc7):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |*    |
-   |*    |
-   |*  * |
-   | **  |
-   | *   |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0x8000,
-0x8000,
-0x9000,
-0x6000,
-0x4000,
-
-/* Character 200 (0xc8):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |**** |
-   |*    |
-   |***  |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0xf000,
-0x8000,
-0xe000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 201 (0xc9):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |**** |
-   |*    |
-   |***  |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0xf000,
-0x8000,
-0xe000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 202 (0xca):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   |**** |
-   |*    |
-   |***  |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0xf000,
-0x8000,
-0xe000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 203 (0xcb):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*  * |
-   |     |
-   |**** |
-   |*    |
-   |***  |
-   |*    |
-   |**** |
-   |     |
-   +-----+
-*/
-0x9000,
-0x0000,
-0xf000,
-0x8000,
-0xe000,
-0x8000,
-0xf000,
-0x0000,
-
-/* Character 204 (0xcc):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 205 (0xcd):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |   * |
-   |  *  |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x1000,
-0x2000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 206 (0xce):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | * * |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x2000,
-0x5000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 207 (0xcf):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |     |
-   | *** |
-   |  *  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x5000,
-0x0000,
-0x7000,
-0x2000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 208 (0xd0):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   | *  *|
-   |*** *|
-   | *  *|
-   | *  *|
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0x4800,
-0xe800,
-0x4800,
-0x4800,
-0x7000,
-0x0000,
-
-/* Character 209 (0xd1):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* *  |
-   |*  * |
-   |** * |
-   |* ** |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x5000,
-0xa000,
-0x9000,
-0xd000,
-0xb000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 210 (0xd2):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 211 (0xd3):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 212 (0xd4):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 213 (0xd5):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* *  |
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x5000,
-0xa000,
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 214 (0xd6):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*  * |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x9000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 215 (0xd7):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |     |
-   | * * |
-   |  *  |
-   | * * |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x0000,
-0x5000,
-0x2000,
-0x5000,
-0x0000,
-
-/* Character 216 (0xd8):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | *** |
-   |* ** |
-   |* ** |
-   |** * |
-   |** * |
-   |***  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x7000,
-0xb000,
-0xb000,
-0xd000,
-0xd000,
-0xe000,
-0x0000,
-
-/* Character 217 (0xd9):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 218 (0xda):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 219 (0xdb):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 220 (0xdc):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |*  * |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x9000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 221 (0xdd):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |   * |
-   |  *  |
-   |*   *|
-   | * * |
-   |  *  |
-   |  *  |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x1000,
-0x2000,
-0x8800,
-0x5000,
-0x2000,
-0x2000,
-0x2000,
-0x0000,
-
-/* Character 222 (0xde):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |***  |
-   |*  * |
-   |*  * |
-   |***  |
-   |*    |
-   |     |
-   +-----+
-*/
-0x0000,
-0x8000,
-0xe000,
-0x9000,
-0x9000,
-0xe000,
-0x8000,
-0x0000,
-
-/* Character 223 (0xdf):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | **  |
-   |*  * |
-   |* *  |
-   |* *  |
-   |*  * |
-   |* *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x6000,
-0x9000,
-0xa000,
-0xa000,
-0x9000,
-0xa000,
-0x0000,
-
-/* Character 224 (0xe0):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |     |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x0000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 225 (0xe1):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |     |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x0000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 226 (0xe2):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | * * |
-   |     |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x2000,
-0x5000,
-0x0000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 227 (0xe3):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* *  |
-   |     |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x5000,
-0xa000,
-0x0000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 228 (0xe4):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | * * |
-   |     |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x5000,
-0x0000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 229 (0xe5):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   | **  |
-   | *** |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x6000,
-0x7000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 230 (0xe6):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |**** |
-   | ** *|
-   |* ** |
-   | ****|
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0xf000,
-0x6800,
-0xb000,
-0x7800,
-0x0000,
-
-/* Character 231 (0xe7):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   |  ** |
-   | *   |
-   | *   |
-   |  ** |
-   |  *  |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x3000,
-0x4000,
-0x4000,
-0x3000,
-0x2000,
-
-/* Character 232 (0xe8):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |     |
-   | **  |
-   |* ** |
-   |**   |
-   | **  |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x0000,
-0x6000,
-0xb000,
-0xc000,
-0x6000,
-0x0000,
-
-/* Character 233 (0xe9):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |     |
-   | **  |
-   |* ** |
-   |**   |
-   | **  |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x0000,
-0x6000,
-0xb000,
-0xc000,
-0x6000,
-0x0000,
-
-/* Character 234 (0xea):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   |     |
-   | **  |
-   |* ** |
-   |**   |
-   | **  |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x0000,
-0x6000,
-0xb000,
-0xc000,
-0x6000,
-0x0000,
-
-/* Character 235 (0xeb):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | * * |
-   |     |
-   | **  |
-   |* ** |
-   |**   |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x5000,
-0x0000,
-0x6000,
-0xb000,
-0xc000,
-0x6000,
-0x0000,
-
-/* Character 236 (0xec):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |     |
-   | **  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x0000,
-0x6000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 237 (0xed):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |   * |
-   |  *  |
-   |     |
-   | **  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x1000,
-0x2000,
-0x0000,
-0x6000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 238 (0xee):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | * * |
-   |     |
-   | **  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x2000,
-0x5000,
-0x0000,
-0x6000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 239 (0xef):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   | * * |
-   |     |
-   | **  |
-   |  *  |
-   |  *  |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x5000,
-0x0000,
-0x6000,
-0x2000,
-0x2000,
-0x7000,
-0x0000,
-
-/* Character 240 (0xf0):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |* *  |
-   | *   |
-   |* *  |
-   |   * |
-   | *** |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0xa000,
-0x4000,
-0xa000,
-0x1000,
-0x7000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 241 (0xf1):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* *  |
-   |     |
-   |***  |
-   |*  * |
-   |*  * |
-   |*  * |
-   |     |
-   +-----+
-*/
-0x5000,
-0xa000,
-0x0000,
-0xe000,
-0x9000,
-0x9000,
-0x9000,
-0x0000,
-
-/* Character 242 (0xf2):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 243 (0xf3):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 244 (0xf4):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 245 (0xf5):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | * * |
-   |* *  |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x5000,
-0xa000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 246 (0xf6):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |     |
-   | **  |
-   |*  * |
-   |*  * |
-   | **  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x0000,
-0x6000,
-0x9000,
-0x9000,
-0x6000,
-0x0000,
-
-/* Character 247 (0xf7):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |  *  |
-   |     |
-   | *** |
-   |     |
-   |  *  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x2000,
-0x0000,
-0x7000,
-0x0000,
-0x2000,
-0x0000,
-
-/* Character 248 (0xf8):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |     |
-   |     |
-   | *** |
-   |* ** |
-   |** * |
-   |***  |
-   |     |
-   +-----+
-*/
-0x0000,
-0x0000,
-0x0000,
-0x7000,
-0xb000,
-0xd000,
-0xe000,
-0x0000,
-
-/* Character 249 (0xf9):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | *   |
-   |  *  |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x4000,
-0x2000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 250 (0xfa):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 251 (0xfb):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   | **  |
-   |*  * |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x6000,
-0x9000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 252 (0xfc):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |     |
-   |*  * |
-   |*  * |
-   |*  * |
-   | *** |
-   |     |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x0000,
-0x9000,
-0x9000,
-0x9000,
-0x7000,
-0x0000,
-
-/* Character 253 (0xfd):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |  *  |
-   | *   |
-   |     |
-   |*  * |
-   |*  * |
-   | *** |
-   |*  * |
-   | **  |
-   +-----+
-*/
-0x2000,
-0x4000,
-0x0000,
-0x9000,
-0x9000,
-0x7000,
-0x9000,
-0x6000,
-
-/* Character 254 (0xfe):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*    |
-   |*    |
-   |***  |
-   |*  * |
-   |***  |
-   |*    |
-   |*    |
-   +-----+
-*/
-0x0000,
-0x8000,
-0x8000,
-0xe000,
-0x9000,
-0xe000,
-0x8000,
-0x8000,
-
-/* Character 255 (0xff):
-   width 5
-   bbx ( 5, 8, 0, -1 )
-
-   +-----+
-   |     |
-   |*  * |
-   |     |
-   |*  * |
-   |*  * |
-   | *** |
-   |*  * |
-   | **  |
-   +-----+
-*/
-0x0000,
-0x9000,
-0x0000,
-0x9000,
-0x9000,
-0x7000,
-0x9000,
-0x6000,
-};
-
-/* Character->glyph mapping. */
-static const unsigned long _sysfont_offset[] = {
-	0,	/* (0x00) */
-	8,	/* (0x01) */
-	16,	/* (0x02) */
-	24,	/* (0x03) */
-	32,	/* (0x04) */
-	40,	/* (0x05) */
-	48,	/* (0x06) */
-	56,	/* (0x07) */
-	64,	/* (0x08) */
-	72,	/* (0x09) */
-	80,	/* (0x0a) */
-	88,	/* (0x0b) */
-	96,	/* (0x0c) */
-	104,	/* (0x0d) */
-	112,	/* (0x0e) */
-	120,	/* (0x0f) */
-	128,	/* (0x10) */
-	136,	/* (0x11) */
-	144,	/* (0x12) */
-	152,	/* (0x13) */
-	160,	/* (0x14) */
-	168,	/* (0x15) */
-	176,	/* (0x16) */
-	184,	/* (0x17) */
-	192,	/* (0x18) */
-	200,	/* (0x19) */
-	208,	/* (0x1a) */
-	216,	/* (0x1b) */
-	224,	/* (0x1c) */
-	232,	/* (0x1d) */
-	240,	/* (0x1e) */
-	248,	/* (0x1f) */
-	256,	/* (0x20) */
-	264,	/* (0x21) */
-	272,	/* (0x22) */
-	280,	/* (0x23) */
-	288,	/* (0x24) */
-	296,	/* (0x25) */
-	304,	/* (0x26) */
-	312,	/* (0x27) */
-	320,	/* (0x28) */
-	328,	/* (0x29) */
-	336,	/* (0x2a) */
-	344,	/* (0x2b) */
-	352,	/* (0x2c) */
-	360,	/* (0x2d) */
-	368,	/* (0x2e) */
-	376,	/* (0x2f) */
-	384,	/* (0x30) */
-	392,	/* (0x31) */
-	400,	/* (0x32) */
-	408,	/* (0x33) */
-	416,	/* (0x34) */
-	424,	/* (0x35) */
-	432,	/* (0x36) */
-	440,	/* (0x37) */
-	448,	/* (0x38) */
-	456,	/* (0x39) */
-	464,	/* (0x3a) */
-	472,	/* (0x3b) */
-	480,	/* (0x3c) */
-	488,	/* (0x3d) */
-	496,	/* (0x3e) */
-	504,	/* (0x3f) */
-	512,	/* (0x40) */
-	520,	/* (0x41) */
-	528,	/* (0x42) */
-	536,	/* (0x43) */
-	544,	/* (0x44) */
-	552,	/* (0x45) */
-	560,	/* (0x46) */
-	568,	/* (0x47) */
-	576,	/* (0x48) */
-	584,	/* (0x49) */
-	592,	/* (0x4a) */
-	600,	/* (0x4b) */
-	608,	/* (0x4c) */
-	616,	/* (0x4d) */
-	624,	/* (0x4e) */
-	632,	/* (0x4f) */
-	640,	/* (0x50) */
-	648,	/* (0x51) */
-	656,	/* (0x52) */
-	664,	/* (0x53) */
-	672,	/* (0x54) */
-	680,	/* (0x55) */
-	688,	/* (0x56) */
-	696,	/* (0x57) */
-	704,	/* (0x58) */
-	712,	/* (0x59) */
-	720,	/* (0x5a) */
-	728,	/* (0x5b) */
-	736,	/* (0x5c) */
-	744,	/* (0x5d) */
-	752,	/* (0x5e) */
-	760,	/* (0x5f) */
-	768,	/* (0x60) */
-	776,	/* (0x61) */
-	784,	/* (0x62) */
-	792,	/* (0x63) */
-	800,	/* (0x64) */
-	808,	/* (0x65) */
-	816,	/* (0x66) */
-	824,	/* (0x67) */
-	832,	/* (0x68) */
-	840,	/* (0x69) */
-	848,	/* (0x6a) */
-	856,	/* (0x6b) */
-	864,	/* (0x6c) */
-	872,	/* (0x6d) */
-	880,	/* (0x6e) */
-	888,	/* (0x6f) */
-	896,	/* (0x70) */
-	904,	/* (0x71) */
-	912,	/* (0x72) */
-	920,	/* (0x73) */
-	928,	/* (0x74) */
-	936,	/* (0x75) */
-	944,	/* (0x76) */
-	952,	/* (0x77) */
-	960,	/* (0x78) */
-	968,	/* (0x79) */
-	976,	/* (0x7a) */
-	984,	/* (0x7b) */
-	992,	/* (0x7c) */
-	1000,	/* (0x7d) */
-	1008,	/* (0x7e) */
-	0,	/* (0x7f) */
-	0,	/* (0x80) */
-	0,	/* (0x81) */
-	0,	/* (0x82) */
-	0,	/* (0x83) */
-	0,	/* (0x84) */
-	0,	/* (0x85) */
-	0,	/* (0x86) */
-	0,	/* (0x87) */
-	0,	/* (0x88) */
-	0,	/* (0x89) */
-	0,	/* (0x8a) */
-	0,	/* (0x8b) */
-	0,	/* (0x8c) */
-	0,	/* (0x8d) */
-	0,	/* (0x8e) */
-	0,	/* (0x8f) */
-	0,	/* (0x90) */
-	0,	/* (0x91) */
-	0,	/* (0x92) */
-	0,	/* (0x93) */
-	0,	/* (0x94) */
-	0,	/* (0x95) */
-	0,	/* (0x96) */
-	0,	/* (0x97) */
-	0,	/* (0x98) */
-	0,	/* (0x99) */
-	0,	/* (0x9a) */
-	0,	/* (0x9b) */
-	0,	/* (0x9c) */
-	0,	/* (0x9d) */
-	0,	/* (0x9e) */
-	0,	/* (0x9f) */
-	1016,	/* (0xa0) */
-	1024,	/* (0xa1) */
-	1032,	/* (0xa2) */
-	1040,	/* (0xa3) */
-	1048,	/* (0xa4) */
-	1056,	/* (0xa5) */
-	1064,	/* (0xa6) */
-	1072,	/* (0xa7) */
-	1080,	/* (0xa8) */
-	1088,	/* (0xa9) */
-	1096,	/* (0xaa) */
-	1104,	/* (0xab) */
-	1112,	/* (0xac) */
-	1120,	/* (0xad) */
-	1128,	/* (0xae) */
-	1136,	/* (0xaf) */
-	1144,	/* (0xb0) */
-	1152,	/* (0xb1) */
-	1160,	/* (0xb2) */
-	1168,	/* (0xb3) */
-	1176,	/* (0xb4) */
-	1184,	/* (0xb5) */
-	1192,	/* (0xb6) */
-	1200,	/* (0xb7) */
-	1208,	/* (0xb8) */
-	1216,	/* (0xb9) */
-	1224,	/* (0xba) */
-	1232,	/* (0xbb) */
-	1240,	/* (0xbc) */
-	1248,	/* (0xbd) */
-	1256,	/* (0xbe) */
-	1264,	/* (0xbf) */
-	1272,	/* (0xc0) */
-	1280,	/* (0xc1) */
-	1288,	/* (0xc2) */
-	1296,	/* (0xc3) */
-	1304,	/* (0xc4) */
-	1312,	/* (0xc5) */
-	1320,	/* (0xc6) */
-	1328,	/* (0xc7) */
-	1336,	/* (0xc8) */
-	1344,	/* (0xc9) */
-	1352,	/* (0xca) */
-	1360,	/* (0xcb) */
-	1368,	/* (0xcc) */
-	1376,	/* (0xcd) */
-	1384,	/* (0xce) */
-	1392,	/* (0xcf) */
-	1400,	/* (0xd0) */
-	1408,	/* (0xd1) */
-	1416,	/* (0xd2) */
-	1424,	/* (0xd3) */
-	1432,	/* (0xd4) */
-	1440,	/* (0xd5) */
-	1448,	/* (0xd6) */
-	1456,	/* (0xd7) */
-	1464,	/* (0xd8) */
-	1472,	/* (0xd9) */
-	1480,	/* (0xda) */
-	1488,	/* (0xdb) */
-	1496,	/* (0xdc) */
-	1504,	/* (0xdd) */
-	1512,	/* (0xde) */
-	1520,	/* (0xdf) */
-	1528,	/* (0xe0) */
-	1536,	/* (0xe1) */
-	1544,	/* (0xe2) */
-	1552,	/* (0xe3) */
-	1560,	/* (0xe4) */
-	1568,	/* (0xe5) */
-	1576,	/* (0xe6) */
-	1584,	/* (0xe7) */
-	1592,	/* (0xe8) */
-	1600,	/* (0xe9) */
-	1608,	/* (0xea) */
-	1616,	/* (0xeb) */
-	1624,	/* (0xec) */
-	1632,	/* (0xed) */
-	1640,	/* (0xee) */
-	1648,	/* (0xef) */
-	1656,	/* (0xf0) */
-	1664,	/* (0xf1) */
-	1672,	/* (0xf2) */
-	1680,	/* (0xf3) */
-	1688,	/* (0xf4) */
-	1696,	/* (0xf5) */
-	1704,	/* (0xf6) */
-	1712,	/* (0xf7) */
-	1720,	/* (0xf8) */
-	1728,	/* (0xf9) */
-	1736,	/* (0xfa) */
-	1744,	/* (0xfb) */
-	1752,	/* (0xfc) */
-	1760,	/* (0xfd) */
-	1768,	/* (0xfe) */
-	1776,	/* (0xff) */
-};
-
-/* Exported structure definition. */
-static const BdfFontDesc desc = {
-	"5x8-L1",
-	5,
-	8,
-	5, 8, 0, -1,
-	7,
+// Character 0 (0x00)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |* *  |
+// |   * |
+// |*    |
+// |   * |
+// |*    |
+// | * * |
+// |     |
+// +-----+
+static const byte glyph0[] = {
+	0x00,
+	0xA0,
+	0x10,
+	0x80,
+	0x10,
+	0x80,
+	0x50,
+	0x00
+};
+
+// Character 1 (0x01)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |  *  |
+// | *** |
+// |*****|
+// | *** |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph1[] = {
+	0x00,
+	0x00,
+	0x20,
+	0x70,
+	0xF8,
+	0x70,
+	0x20,
+	0x00
+};
+
+// Character 2 (0x02)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// | * * |
+// |* * *|
+// | * * |
+// |* * *|
+// | * * |
+// |* * *|
+// | * * |
+// |* * *|
+// +-----+
+static const byte glyph2[] = {
+	0x50,
+	0xA8,
+	0x50,
+	0xA8,
+	0x50,
+	0xA8,
+	0x50,
+	0xA8
+};
+
+// Character 3 (0x03)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |* *  |
+// |* *  |
+// |***  |
+// |* *  |
+// |* *  |
+// | *** |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph3[] = {
+	0xA0,
+	0xA0,
+	0xE0,
+	0xA0,
+	0xA0,
+	0x70,
+	0x20,
+	0x20
+};
+
+// Character 4 (0x04)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |***  |
+// |*    |
+// |**   |
+// |* ***|
+// |* *  |
+// |  ** |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph4[] = {
+	0xE0,
+	0x80,
+	0xC0,
+	0xB8,
+	0xA0,
+	0x30,
+	0x20,
+	0x20
+};
+
+// Character 5 (0x05)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// | **  |
+// |*    |
+// |*    |
+// | **  |
+// |  ** |
+// |  * *|
+// |  ** |
+// |  * *|
+// +-----+
+static const byte glyph5[] = {
+	0x60,
+	0x80,
+	0x80,
+	0x60,
+	0x30,
+	0x28,
+	0x30,
+	0x28
+};
+
+// Character 6 (0x06)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |*    |
+// |*    |
+// |*    |
+// |***  |
+// |  ***|
+// |  *  |
+// |  ** |
+// |  *  |
+// +-----+
+static const byte glyph6[] = {
+	0x80,
+	0x80,
+	0x80,
+	0xE0,
+	0x38,
+	0x20,
+	0x30,
+	0x20
+};
+
+// Character 7 (0x07)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// | * * |
+// |  *  |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph7[] = {
+	0x00,
+	0x20,
+	0x50,
+	0x20,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 8 (0x08)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |  *  |
+// | *** |
+// |  *  |
+// |     |
+// | *** |
+// |     |
+// +-----+
+static const byte glyph8[] = {
+	0x00,
+	0x00,
+	0x20,
+	0x70,
+	0x20,
+	0x00,
+	0x70,
+	0x00
+};
+
+// Character 9 (0x09)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |*  * |
+// |** * |
+// |* ** |
+// |*  * |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  ***|
+// +-----+
+static const byte glyph9[] = {
+	0x90,
+	0xD0,
+	0xB0,
+	0x90,
+	0x20,
+	0x20,
+	0x20,
+	0x38
+};
+
+// Character 10 (0x0A)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |* *  |
+// |* *  |
+// |* *  |
+// | *   |
+// |  ***|
+// |   * |
+// |   * |
+// |   * |
+// +-----+
+static const byte glyph10[] = {
+	0xA0,
+	0xA0,
+	0xA0,
+	0x40,
+	0x38,
+	0x10,
+	0x10,
+	0x10
+};
+
+// Character 11 (0x0B)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |***  |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph11[] = {
+	0x20,
+	0x20,
+	0x20,
+	0xE0,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 12 (0x0C)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |***  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph12[] = {
+	0x00,
+	0x00,
+	0x00,
+	0xE0,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 13 (0x0D)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |  ***|
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph13[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x38,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 14 (0x0E)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |  ***|
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph14[] = {
+	0x20,
+	0x20,
+	0x20,
+	0x38,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 15 (0x0F)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |*****|
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph15[] = {
+	0x20,
+	0x20,
+	0x20,
+	0xF8,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 16 (0x10)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |*****|
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph16[] = {
+	0xF8,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 17 (0x11)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |*****|
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph17[] = {
+	0x00,
+	0xF8,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 18 (0x12)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |*****|
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph18[] = {
+	0x00,
+	0x00,
+	0x00,
+	0xF8,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 19 (0x13)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |*****|
+// |     |
+// +-----+
+static const byte glyph19[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0xF8,
+	0x00
+};
+
+// Character 20 (0x14)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |*****|
+// +-----+
+static const byte glyph20[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0xF8
+};
+
+// Character 21 (0x15)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |  ***|
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph21[] = {
+	0x20,
+	0x20,
+	0x20,
+	0x38,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 22 (0x16)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |***  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph22[] = {
+	0x20,
+	0x20,
+	0x20,
+	0xE0,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 23 (0x17)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |*****|
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph23[] = {
+	0x20,
+	0x20,
+	0x20,
+	0xF8,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 24 (0x18)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |*****|
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph24[] = {
+	0x00,
+	0x00,
+	0x00,
+	0xF8,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 25 (0x19)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// +-----+
+static const byte glyph25[] = {
+	0x20,
+	0x20,
+	0x20,
+	0x20,
+	0x20,
+	0x20,
+	0x20,
+	0x20
+};
+
+// Character 26 (0x1A)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |   * |
+// |  *  |
+// | *   |
+// |  *  |
+// |   * |
+// | *** |
+// |     |
+// +-----+
+static const byte glyph26[] = {
+	0x00,
+	0x10,
+	0x20,
+	0x40,
+	0x20,
+	0x10,
+	0x70,
+	0x00
+};
+
+// Character 27 (0x1B)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | *   |
+// |  *  |
+// |   * |
+// |  *  |
+// | *   |
+// | *** |
+// |     |
+// +-----+
+static const byte glyph27[] = {
+	0x00,
+	0x40,
+	0x20,
+	0x10,
+	0x20,
+	0x40,
+	0x70,
+	0x00
+};
+
+// Character 28 (0x1C)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |*****|
+// | * * |
+// | * * |
+// | * * |
+// |     |
+// +-----+
+static const byte glyph28[] = {
+	0x00,
+	0x00,
+	0x00,
+	0xF8,
+	0x50,
+	0x50,
+	0x50,
+	0x00
+};
+
+// Character 29 (0x1D)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |  *  |
+// |**** |
+// | **  |
+// |**** |
+// | *   |
+// |     |
+// +-----+
+static const byte glyph29[] = {
+	0x00,
+	0x00,
+	0x20,
+	0xF0,
+	0x60,
+	0xF0,
+	0x40,
+	0x00
+};
+
+// Character 30 (0x1E)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// | * * |
+// |***  |
+// | *   |
+// | * * |
+// |* *  |
+// |     |
+// +-----+
+static const byte glyph30[] = {
+	0x00,
+	0x20,
+	0x50,
+	0xE0,
+	0x40,
+	0x50,
+	0xA0,
+	0x00
+};
+
+// Character 31 (0x1F)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |  *  |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph31[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x20,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 32 (0x20)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph32[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 33 (0x21)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// |     |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph33[] = {
+	0x00,
+	0x20,
+	0x20,
+	0x20,
+	0x20,
+	0x00,
+	0x20,
+	0x00
+};
+
+// Character 34 (0x22)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | * * |
+// | * * |
+// | * * |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph34[] = {
+	0x00,
+	0x50,
+	0x50,
+	0x50,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 35 (0x23)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// | * * |
+// | * * |
+// |*****|
+// | * * |
+// |*****|
+// | * * |
+// | * * |
+// |     |
+// +-----+
+static const byte glyph35[] = {
+	0x50,
+	0x50,
+	0xF8,
+	0x50,
+	0xF8,
+	0x50,
+	0x50,
+	0x00
+};
+
+// Character 36 (0x24)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |  *  |
+// | *** |
+// |* *  |
+// | *** |
+// |  * *|
+// | *** |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph36[] = {
+	0x20,
+	0x70,
+	0xA0,
+	0x70,
+	0x28,
+	0x70,
+	0x20,
+	0x00
+};
+
+// Character 37 (0x25)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | *   |
+// | * * |
+// |  *  |
+// | * * |
+// |   * |
+// |     |
+// |     |
+// +-----+
+static const byte glyph37[] = {
+	0x00,
+	0x40,
+	0x50,
+	0x20,
+	0x50,
+	0x10,
+	0x00,
+	0x00
+};
+
+// Character 38 (0x26)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// | *   |
+// |* *  |
+// |* *  |
+// | *   |
+// |* *  |
+// |* *  |
+// | * * |
+// |     |
+// +-----+
+static const byte glyph38[] = {
+	0x40,
+	0xA0,
+	0xA0,
+	0x40,
+	0xA0,
+	0xA0,
+	0x50,
+	0x00
+};
+
+// Character 39 (0x27)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// |  *  |
+// |  *  |
+// |     |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph39[] = {
+	0x00,
+	0x20,
+	0x20,
+	0x20,
+	0x00,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 40 (0x28)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// | *   |
+// | *   |
+// | *   |
+// | *   |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph40[] = {
+	0x00,
+	0x20,
+	0x40,
+	0x40,
+	0x40,
+	0x40,
+	0x20,
+	0x00
+};
+
+// Character 41 (0x29)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | *   |
+// |  *  |
+// |  *  |
+// |  *  |
+// |  *  |
+// | *   |
+// |     |
+// +-----+
+static const byte glyph41[] = {
+	0x00,
+	0x40,
+	0x20,
+	0x20,
+	0x20,
+	0x20,
+	0x40,
+	0x00
+};
+
+// Character 42 (0x2A)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |*  * |
+// | **  |
+// |**** |
+// | **  |
+// |*  * |
+// |     |
+// +-----+
+static const byte glyph42[] = {
+	0x00,
+	0x00,
+	0x90,
+	0x60,
+	0xF0,
+	0x60,
+	0x90,
+	0x00
+};
+
+// Character 43 (0x2B)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |  *  |
+// |  *  |
+// |*****|
+// |  *  |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph43[] = {
+	0x00,
+	0x00,
+	0x20,
+	0x20,
+	0xF8,
+	0x20,
+	0x20,
+	0x00
+};
+
+// Character 44 (0x2C)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |  ** |
+// |  *  |
+// | *   |
+// +-----+
+static const byte glyph44[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x30,
+	0x20,
+	0x40
+};
+
+// Character 45 (0x2D)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |**** |
+// |     |
+// |     |
+// |     |
+// +-----+
+static const byte glyph45[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0xF0,
+	0x00,
+	0x00,
+	0x00
+};
+
+// Character 46 (0x2E)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |     |
+// |     |
+// |  *  |
+// | *** |
+// |  *  |
+// +-----+
+static const byte glyph46[] = {
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x00,
+	0x20,
+	0x70,
+	0x20
+};
+
+// Character 47 (0x2F)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |   * |
+// |   * |
+// |  *  |
+// | *   |
+// |*    |
+// |*    |
+// |     |
+// +-----+
+static const byte glyph47[] = {
+	0x00,
+	0x10,
+	0x10,
+	0x20,
+	0x40,
+	0x80,
+	0x80,
+	0x00
+};
+
+// Character 48 (0x30)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// | * * |
+// | * * |
+// | * * |
+// | * * |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph48[] = {
+	0x00,
+	0x20,
+	0x50,
+	0x50,
+	0x50,
+	0x50,
+	0x20,
+	0x00
+};
+
+// Character 49 (0x31)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// | **  |
+// |  *  |
+// |  *  |
+// |  *  |
+// | *** |
+// |     |
+// +-----+
+static const byte glyph49[] = {
+	0x00,
+	0x20,
+	0x60,
+	0x20,
+	0x20,
+	0x20,
+	0x70,
+	0x00
+};
+
+// Character 50 (0x32)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | **  |
+// |*  * |
+// |   * |
+// | **  |
+// |*    |
+// |**** |
+// |     |
+// +-----+
+static const byte glyph50[] = {
+	0x00,
+	0x60,
+	0x90,
+	0x10,
+	0x60,
+	0x80,
+	0xF0,
+	0x00
+};
+
+// Character 51 (0x33)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |**** |
+// |  *  |
+// | **  |
+// |   * |
+// |*  * |
+// | **  |
+// |     |
+// +-----+
+static const byte glyph51[] = {
+	0x00,
+	0xF0,
+	0x20,
+	0x60,
+	0x10,
+	0x90,
+	0x60,
+	0x00
+};
+
+// Character 52 (0x34)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |  *  |
+// | **  |
+// |* *  |
+// |**** |
+// |  *  |
+// |  *  |
+// |     |
+// +-----+
+static const byte glyph52[] = {
+	0x00,
+	0x20,
+	0x60,
+	0xA0,
+	0xF0,
+	0x20,
+	0x20,
+	0x00
+};
+
+// Character 53 (0x35)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |**** |
+// |*    |
+// |***  |
+// |   * |
+// |*  * |
+// | **  |
+// |     |
+// +-----+
+static const byte glyph53[] = {
+	0x00,
+	0xF0,
+	0x80,
+	0xE0,
+	0x10,
+	0x90,
+	0x60,
+	0x00
+};
+
+// Character 54 (0x36)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | **  |
+// |*    |
+// |***  |
+// |*  * |
+// |*  * |
+// | **  |
+// |     |
+// +-----+
+static const byte glyph54[] = {
+	0x00,
+	0x60,
+	0x80,
+	0xE0,
+	0x90,
+	0x90,
+	0x60,
+	0x00
+};
+
+// Character 55 (0x37)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |**** |
+// |   * |
+// |  *  |
+// |  *  |
+// | *   |
+// | *   |
+// |     |
+// +-----+
+static const byte glyph55[] = {
+	0x00,
+	0xF0,
+	0x10,
+	0x20,
+	0x20,
+	0x40,
+	0x40,
+	0x00
+};
+
+// Character 56 (0x38)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | **  |
+// |*  * |
+// | **  |
+// |*  * |
+// |*  * |
+// | **  |
+// |     |
+// +-----+
+static const byte glyph56[] = {
+	0x00,
+	0x60,
+	0x90,
+	0x60,
+	0x90,
+	0x90,
+	0x60,
+	0x00
+};
+
+// Character 57 (0x39)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | **  |
+// |*  * |
+// |*  * |
+// | *** |
+// |   * |
+// | **  |
+// |     |
+// +-----+
+static const byte glyph57[] = {
+	0x00,
+	0x60,
+	0x90,
+	0x90,
+	0x70,
+	0x10,
+	0x60,
+	0x00
+};
+
+// Character 58 (0x3A)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// | **  |
+// | **  |
+// |     |
+// | **  |
+// | **  |
+// |     |
+// +-----+
+static const byte glyph58[] = {
+	0x00,
+	0x00,
+	0x60,
+	0x60,
+	0x00,
+	0x60,
+	0x60,
+	0x00
+};
+
+// Character 59 (0x3B)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |  ** |
+// |  ** |
+// |     |
+// |  ** |
+// |  *  |
+// | *   |
+// +-----+
+static const byte glyph59[] = {
+	0x00,
+	0x00,
+	0x30,
+	0x30,
+	0x00,
+	0x30,
+	0x20,
+	0x40
+};
+
+// Character 60 (0x3C)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |   * |
+// |  *  |
+// | *   |
+// | *   |
+// |  *  |
+// |   * |
+// |     |
+// +-----+
+static const byte glyph60[] = {
+	0x00,
+	0x10,
+	0x20,
+	0x40,
+	0x40,
+	0x20,
+	0x10,
+	0x00
+};
+
+// Character 61 (0x3D)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// |     |
+// |     |
+// |**** |
+// |     |
+// |**** |
+// |     |
+// |     |
+// +-----+
+static const byte glyph61[] = {
+	0x00,
+	0x00,
+	0x00,
+	0xF0,
+	0x00,
+	0xF0,
+	0x00,
+	0x00
+};
+
+// Character 62 (0x3E)
+// Box: 5 8 0 -1
+// Advance: 5
+//
+// +-----+
+// |     |
+// | *   |
+// |  *  |
+// |   * |
+// |   * |
+// |  *  |
+// | *   |
+// |     |
+// +-----+
+static const byte glyph62[] = {
+	0x00,
+	0x40,
+	0x20,
+	0x10,
+	0x10,
+	0x20,
+	0x40,
+	0x00






More information about the Scummvm-git-logs mailing list