summaryrefslogtreecommitdiff
path: root/bk_ps.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 /bk_ps.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 'bk_ps.c')
-rw-r--r--bk_ps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bk_ps.c b/bk_ps.c
index 5409290..95d1383 100644
--- a/bk_ps.c
+++ b/bk_ps.c
@@ -56,7 +56,7 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
fprintf(fp, "%%%%DocumentNeededResources:\n");
for (fe = doc->fonts->head; fe; fe = fe->next)
/* XXX This may request the same font multiple times. */
- fprintf(fp, "%%%%+ font %s\n", fe->font->name);
+ fprintf(fp, "%%%%+ font %s\n", fe->font->info->name);
fprintf(fp, "%%%%DocumentSuppliedResources: procset Halibut 0 0\n");
fprintf(fp, "%%%%EndComments\n");
@@ -96,7 +96,7 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
for (fe = doc->fonts->head; fe; fe = fe->next)
/* XXX This may request the same font multiple times. */
- fprintf(fp, "%%%%IncludeResource: font %s\n", fe->font->name);
+ fprintf(fp, "%%%%IncludeResource: font %s\n", fe->font->info->name);
/*
* Re-encode the fonts.
@@ -109,7 +109,8 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
sprintf(fname, "f%d", font_index++);
fe->name = dupstr(fname);
- fprintf(fp, "/%s findfont dup length dict begin\n", fe->font->name);
+ fprintf(fp, "/%s findfont dup length dict begin\n",
+ fe->font->info->name);
fprintf(fp, "{1 index /FID ne {def} {pop pop} ifelse} forall\n");
fprintf(fp, "/Encoding [\n");
for (i = 0; i < 256; i++)