summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2006-12-09 14:44:47 +0000
committerBen Harris <bjh21@bjh21.me.uk>2006-12-09 14:44:47 +0000
commit76b522bc5aac82f7d1c0e3433f1620a7a192bdad (patch)
tree3096ba08982d23b7ea63a83649360f490acb20d4 /error.c
parent92242aeaf21903a4c5a12a7c74eb77fcd7158a52 (diff)
downloadhalibut-76b522bc5aac82f7d1c0e3433f1620a7a192bdad.zip
halibut-76b522bc5aac82f7d1c0e3433f1620a7a192bdad.tar.gz
halibut-76b522bc5aac82f7d1c0e3433f1620a7a192bdad.tar.bz2
halibut-76b522bc5aac82f7d1c0e3433f1620a7a192bdad.tar.xz
Correct embedding of Type 1 fonts in PDF. Error cases (e.g. invalid Type 1
fonts) may not be well handled, and may emit invalid PDF. [originally from svn r6974]
Diffstat (limited to 'error.c')
-rw-r--r--error.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/error.c b/error.c
index dfe65e3..2dae220 100644
--- a/error.c
+++ b/error.c
@@ -315,6 +315,27 @@ static void do_error(int code, va_list ap) {
sprintf(error, "AFM key '%.200s' requires %d values", sp, i);
flags = FILEPOS;
break;
+ case err_pfeof:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "Type 1 font file ended unexpectedly");
+ flags = FILEPOS;
+ break;
+ case err_pfhead:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "Type 1 font file header line invalid");
+ flags = FILEPOS;
+ break;
+ case err_pfbad:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "Type 1 font file invalid");
+ flags = FILEPOS;
+ break;
+ case err_pfnoafm:
+ fpos = *va_arg(ap, filepos *);
+ sp = va_arg(ap, char *);
+ sprintf(error, "No metrics available for Type 1 font '%.200s'", sp);
+ flags = FILEPOS;
+ break;
case err_whatever:
sp = va_arg(ap, char *);
vsprintf(error, sp, ap);