~mdw
/
sgt
/
halibut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When loading a Type 1 font, remember to terminate the linked list we load
[sgt/halibut]
/
bk_pdf.c
diff --git
a/bk_pdf.c
b/bk_pdf.c
index
3a0ec75
..
74944f0
100644
(file)
--- a/
bk_pdf.c
+++ b/
bk_pdf.c
@@
-236,7
+236,7
@@
void pdf_backend(paragraph *sourceform, keywordlist *keywords,
objtext(fontdesc, buf);
sprintf(buf, "/StemV %g\n", fi->stemv);
objtext(fontdesc, buf);
objtext(fontdesc, buf);
sprintf(buf, "/StemV %g\n", fi->stemv);
objtext(fontdesc, buf);
- if (fi->f
p
) {
+ if (fi->f
ontfile && fi->filetype == TYPE1
) {
object *fontfile = new_object(&olist);
size_t len;
char *ffbuf;
object *fontfile = new_object(&olist);
size_t len;
char *ffbuf;
@@
-487,13
+487,20
@@
void pdf_backend(paragraph *sourceform, keywordlist *keywords,
rdaddsc(&rs, text);
if (o->stream.text) {
rdaddsc(&rs, text);
if (o->stream.text) {
+ if (!o->main.text)
+ rdaddsc(&o->main, "<<\n");
+#ifdef PDF_NOCOMPRESS
+ zlen = o->stream.pos;
+ zbuf = snewn(zlen, char);
+ memcpy(zbuf, o->stream.text, zlen);
+ sprintf(text, "/Length %d\n>>\n", zlen);
+#else
zcontext = deflate_compress_new(DEFLATE_TYPE_ZLIB);
deflate_compress_data(zcontext, o->stream.text, o->stream.pos,
DEFLATE_END_OF_DATA, &zbuf, &zlen);
deflate_compress_free(zcontext);
zcontext = deflate_compress_new(DEFLATE_TYPE_ZLIB);
deflate_compress_data(zcontext, o->stream.text, o->stream.pos,
DEFLATE_END_OF_DATA, &zbuf, &zlen);
deflate_compress_free(zcontext);
- if (!o->main.text)
- rdaddsc(&o->main, "<<\n");
sprintf(text, "/Filter/FlateDecode\n/Length %d\n>>\n", zlen);
sprintf(text, "/Filter/FlateDecode\n/Length %d\n>>\n", zlen);
+#endif
rdaddsc(&o->main, text);
}
rdaddsc(&o->main, text);
}