summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2006-05-13 13:56:05 +0000
committerBen Harris <bjh21@bjh21.me.uk>2006-05-13 13:56:05 +0000
commitc072eb7debe80aca352a5dc26bff08a6ecd8baff (patch)
tree18c4cff9d3257803ec49535179ead154ffd3a4c6 /input.c
parent1d9065a073a8f8ac707a6fa2e7683755f1b82df0 (diff)
downloadhalibut-c072eb7debe80aca352a5dc26bff08a6ecd8baff.zip
halibut-c072eb7debe80aca352a5dc26bff08a6ecd8baff.tar.gz
halibut-c072eb7debe80aca352a5dc26bff08a6ecd8baff.tar.bz2
halibut-c072eb7debe80aca352a5dc26bff08a6ecd8baff.tar.xz
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]
Diffstat (limited to 'input.c')
-rw-r--r--input.c6
1 files changed, 5 insertions, 1 deletions
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++;
}