summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2006-05-08 22:54:19 +0000
committerBen Harris <bjh21@bjh21.me.uk>2006-05-08 22:54:19 +0000
commit7e9483d0ffc2a400507c250df50dcf5ad3ef0cf8 (patch)
tree0fd99558a65ea26aec74e52337c92f20815a4e6b /error.c
parentb42099295f41ebbc172facd0757bcc255070b7c1 (diff)
downloadhalibut-7e9483d0ffc2a400507c250df50dcf5ad3ef0cf8.zip
halibut-7e9483d0ffc2a400507c250df50dcf5ad3ef0cf8.tar.gz
halibut-7e9483d0ffc2a400507c250df50dcf5ad3ef0cf8.tar.bz2
halibut-7e9483d0ffc2a400507c250df50dcf5ad3ef0cf8.tar.xz
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]
Diffstat (limited to 'error.c')
-rw-r--r--error.c8
1 files changed, 8 insertions, 0 deletions
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);