From 7e9483d0ffc2a400507c250df50dcf5ad3ef0cf8 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 8 May 2006 22:54:19 +0000 Subject: Add font-selection mechanism to the paper backend. Since we have no way to load font metrics dynamically, we're restricted to the fonts whose metrics are compiled into Halibut. Font structures aren't reused when the same font is specified twice, nor are unused fonts removed from the output. Finally, the default configuration overflows lines in the manual, but this would need a change to Halibut's grammar to fix. Still, what's there works. [originally from svn r6667] --- error.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'error.c') diff --git a/error.c b/error.c index 3635f0f..5575100 100644 --- a/error.c +++ b/error.c @@ -278,6 +278,14 @@ static void do_error(int code, va_list ap) { flags = FILEPOS; sfree(sp); break; + case err_nofont: + fpos = *va_arg(ap, filepos *); + wsp = va_arg(ap, wchar_t *); + sp = utoa_locale_dup(wsp); + sprintf(error, "font `%.200s' not recognised", sp); + flags = FILEPOS; + sfree(sp); + break; case err_whatever: sp = va_arg(ap, char *); vsprintf(error, sp, ap); -- cgit v1.1