630 |
+ *val = arrayref->get(i); |
+ *val = arrayref->get(i); |
631 |
if (val->isStream()) { |
if (val->isStream()) { |
632 |
ObjectList *rover = self->_streams; |
ObjectList *rover = self->_streams; |
633 |
ObjectList *item = (ObjectList *)xmalloc (sizeof(ObjectList)); |
ObjectList *item = (ObjectList *)priv_xmalloc (sizeof(ObjectList)); |
634 |
diff --git a/source/texk/web2c/pdftexdir/pdftoepdf.cc b/source/texk/web2c/pdftexdir/pdftoepdf.cc |
diff --git a/source/texk/web2c/pdftexdir/pdftoepdf.cc b/source/texk/web2c/pdftexdir/pdftoepdf.cc |
635 |
index 253024f..5b3d7b4 100644 |
index 253024f..5b3d7b4 100644 |
636 |
--- a/source/texk/web2c/pdftexdir/pdftoepdf.cc |
--- a/source/texk/web2c/pdftexdir/pdftoepdf.cc |
728 |
fontfile, ffsubtype, stemV; |
fontfile, ffsubtype, stemV; |
729 |
GfxFont *gfont; |
GfxFont *gfont; |
730 |
fd_entry *fd; |
fd_entry *fd; |
731 |
@@ -412,31 +387,30 @@ static void copyFont(char *tag, Object * fontRef) |
@@ -388,33 +388,32 @@ |
732 |
} |
} |
733 |
// Only handle included Type1 (and Type1C) fonts; anything else will be copied. |
// Only handle included Type1 (and Type1C) fonts; anything else will be copied. |
734 |
// Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. |
// Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. |
745 |
+ && (basefont = fontdict.dictLookup("BaseFont")).isName() |
+ && (basefont = fontdict.dictLookup("BaseFont")).isName() |
746 |
+ && (fontdescRef = fontdict.dictLookupNF("FontDescriptor")).isRef() |
+ && (fontdescRef = fontdict.dictLookupNF("FontDescriptor")).isRef() |
747 |
+ && (fontdesc = fontdescRef.fetch(xref)).isDict() |
+ && (fontdesc = fontdescRef.fetch(xref)).isDict() |
748 |
+ && ((fontfile = fontdesc.dictLookup("FontFile")).isStream() |
+ && (fontfile = fontdesc.dictLookup("FontFile")).isStream() |
749 |
|| (REPLACE_TYPE1C |
|| (REPLACE_TYPE1C |
750 |
- && fontdesc->dictLookup("FontFile3", &fontfile)->isStream() |
- && fontdesc->dictLookup("FontFile3", &fontfile)->isStream() |
751 |
- && fontfile->streamGetDict()->lookup("Subtype", |
- && fontfile->streamGetDict()->lookup("Subtype", |
756 |
+ && (ffsubtype = fontfile.streamGetDict()->lookup("Subtype")).isName() |
+ && (ffsubtype = fontfile.streamGetDict()->lookup("Subtype")).isName() |
757 |
+ && !strcmp(ffsubtype.getName(), "Type1C"))) |
+ && !strcmp(ffsubtype.getName(), "Type1C"))) |
758 |
+ && (fontmap = lookup_fontmap(basefont.getName())) != NULL) { |
+ && (fontmap = lookup_fontmap(basefont.getName())) != NULL) { |
759 |
// copy the value of /StemV |
// round /StemV value, since the PDF input is a float |
760 |
|
// (see Font Descriptors in PDF reference), but we only store an |
761 |
|
// integer, since we don't want to change the struct. |
762 |
- fontdesc->dictLookup("StemV", &stemV); |
- fontdesc->dictLookup("StemV", &stemV); |
763 |
- fd = epdf_create_fontdescriptor(fontmap, stemV->getInt()); |
- fd = epdf_create_fontdescriptor(fontmap, zround(stemV->getNum())); |
764 |
- if (fontdesc->dictLookup("CharSet", &charset) && |
- if (fontdesc->dictLookup("CharSet", &charset) && |
765 |
- charset->isString() && is_subsetable(fontmap)) |
- charset->isString() && is_subsetable(fontmap)) |
766 |
- epdf_mark_glyphs(fd, charset->getString()->getCString()); |
- epdf_mark_glyphs(fd, charset->getString()->getCString()); |
767 |
+ stemV = fontdesc.dictLookup("StemV"); |
+ stemV = fontdesc.dictLookup("StemV"); |
768 |
+ fd = epdf_create_fontdescriptor(fontmap, stemV.getInt()); |
+ fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); |
769 |
+ if (!(charset = fontdesc.dictLookup("CharSet")).isNull() && |
+ if (!(charset = fontdesc.dictLookup("CharSet")).isNull() && |
770 |
+ charset.isString() && is_subsetable(fontmap)) |
+ charset.isString() && is_subsetable(fontmap)) |
771 |
+ epdf_mark_glyphs(fd, charset.getString()->getCString()); |
+ epdf_mark_glyphs(fd, charset.getString()->getCString()); |