From c072eb7debe80aca352a5dc26bff08a6ecd8baff Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 13 May 2006 13:56:05 +0000 Subject: Initial support for adding fonts at run-time. Currently we only support loading AFM files, we recognise them by name, and we can't embed fonts in the output (which is also invalid, though accepted by xpdf, in the PDF case). Oh, and there's no documentation. Still, it's a start. [originally from svn r6681] --- input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'input.c') diff --git a/input.c b/input.c index dc44675..6e20488 100644 --- a/input.c +++ b/input.c @@ -1576,7 +1576,11 @@ paragraph *read_input(input *in, indexdata *idx) { in->csstate = charset_init_state; in->wcpos = in->nwc = 0; in->pushback_chars = NULL; - read_file(&hptr, in, idx, macros); + if (strcmp(in->filenames[in->currindex] + + strlen(in->filenames[in->currindex]) - 4, ".afm") == 0) + read_afm_file(in); + else + read_file(&hptr, in, idx, macros); } in->currindex++; } -- cgit v1.1