Date: Monday, September 25, 2017 @ 21:15:31 Author: remy Revision: 306228
upgpkg: texlive-bin 2017.44590-4 Fixes bug FS#55721 Modified: texlive-bin/trunk/PKGBUILD texlive-bin/trunk/texlive-poppler-0.59.patch ----------------------------+ PKGBUILD | 4 +- texlive-poppler-0.59.patch | 73 +++++++++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 32 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-09-25 19:48:58 UTC (rev 306227) +++ PKGBUILD 2017-09-25 21:15:31 UTC (rev 306228) @@ -4,7 +4,7 @@ pkgname=('texlive-bin' 'libsynctex') pkgver=2017.44590 -pkgrel=3 +pkgrel=4 license=('GPL') arch=('i686' 'x86_64') makedepends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler' @@ -17,7 +17,7 @@ "texlive-poppler-0.59.patch") sha256sums=('4645b4d55fc500ba9be7156a6a330afb44fbf7fda40dfd73fe9cb16d207f2038' 'ee97f3e07e235dee4ad6d0c3e85c2260914c965e94d5ffbf481fa506df5f01ec' - '8ff387b417b4da920d6ffc3f3d89e52796334693cb88b97bf1770931bf2791e5') + '82703c2d8698e15ee9a8bed6eee1a7140dc48ea2f65a497ddf81f187df6e6832') prepare() { cd "$srcdir/source" Modified: texlive-poppler-0.59.patch =================================================================== --- texlive-poppler-0.59.patch 2017-09-25 19:48:58 UTC (rev 306227) +++ texlive-poppler-0.59.patch 2017-09-25 21:15:31 UTC (rev 306228) @@ -720,16 +720,39 @@ pdf_puts(" "); } pdf_puts("]\n"); -@@ -396,7 +359,7 @@ +@@ -394,10 +357,29 @@ + #define REPLACE_TYPE1C true + ++static bool embeddableFont(Object * fontdesc) ++{ ++ Object fontfile, ffsubtype; ++ ++ if (!fontdesc->isDict()) ++ return false; ++ fontfile = fontdesc->dictLookup("FontFile"); ++ if (fontfile.isStream()) ++ return true; ++ if (REPLACE_TYPE1C) { ++ fontfile = fontdesc->dictLookup("FontFile3"); ++ if (!fontfile.isStream()) ++ return false; ++ ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); ++ return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); ++ } ++ return false; ++} ++ static void copyFont(char *tag, Object * fontRef) { - PdfObject fontdict, subtype, basefont, fontdescRef, fontdesc, charset, +- fontfile, ffsubtype, stemV; + Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - fontfile, ffsubtype, stemV; ++ stemV; GfxFont *gfont; fd_entry *fd; -@@ -413,33 +376,49 @@ + fm_entry *fontmap; +@@ -413,33 +395,39 @@ } // Only handle included Type1 (and Type1C) fonts; anything else will be copied. // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. @@ -747,6 +770,7 @@ - && !strcmp(ffsubtype->getName(), "Type1C"))) - && (fontmap = lookup_fontmap(basefont->getName())) != NULL) { + fontdict = fontRef->fetch(xref); ++ fontdesc = Object(objNull); + if (fontdict.isDict()) { + subtype = fontdict.dictLookup("Subtype"); + basefont = fontdict.dictLookup("BaseFont"); @@ -753,17 +777,6 @@ + fontdescRef = fontdict.dictLookupNF("FontDescriptor"); + if (fontdescRef.isRef()) { + fontdesc = fontdescRef.fetch(xref); -+ if (fontdesc.isDict()) { -+ fontfile = fontdesc.dictLookup("FontFile"); -+ if (!fontfile.isStream() && REPLACE_TYPE1C) { -+ fontfile = fontdesc.dictLookup("FontFile3"); -+ ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); -+ if (!(ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"))) { -+ // not a Type1-C font. -+ fontfile = Object(objNull); -+ } -+ } -+ } + } + } + if (!fixedinclusioncopyfont && fontdict.isDict() @@ -772,7 +785,7 @@ + && basefont.isName() + && fontdescRef.isRef() + && fontdesc.isDict() -+ && fontfile.isStream() ++ && embeddableFont(&fontdesc) + && (fontmap = lookup_fontmap(basefont.getName())) != NULL) { // round /StemV value, since the PDF input is a float // (see Font Descriptors in PDF reference), but we only store an @@ -799,7 +812,7 @@ pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, addEncoding(gfont))); } else { -@@ -451,24 +430,24 @@ +@@ -451,24 +439,24 @@ static void copyFontResources(Object * obj) { @@ -829,7 +842,7 @@ } pdf_puts(">>\n"); } -@@ -557,7 +536,7 @@ +@@ -557,7 +545,7 @@ static void copyObject(Object * obj) { @@ -838,7 +851,7 @@ int i, l, c; Ref ref; char *p; -@@ -601,8 +580,8 @@ +@@ -601,8 +589,8 @@ } else if (obj->isArray()) { pdf_puts("["); for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { @@ -849,7 +862,7 @@ pdf_puts(" "); copyObject(&obj1); } -@@ -612,7 +591,7 @@ +@@ -612,7 +600,7 @@ copyDict(obj); pdf_puts(">>"); } else if (obj->isStream()) { @@ -858,7 +871,7 @@ pdf_puts("<<\n"); copyDict(&obj1); pdf_puts(">>\n"); -@@ -638,9 +617,8 @@ +@@ -638,9 +626,8 @@ InObj *r; for (r = inObjList; r != 0; r = r->next) { if (!r->written) { @@ -869,7 +882,7 @@ if (r->type == objFont) { assert(!obj1.isStream()); pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this -@@ -656,7 +634,6 @@ +@@ -656,7 +643,6 @@ pdf_puts("\n"); pdfendobj(); } @@ -877,7 +890,7 @@ } } } -@@ -839,8 +816,8 @@ +@@ -839,8 +825,8 @@ Page *page; Ref *pageRef; Dict *pageDict; @@ -888,7 +901,7 @@ bool writeSepGroup = false; Object info; char *key; -@@ -867,8 +844,8 @@ +@@ -867,8 +853,8 @@ encodingList = 0; page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); @@ -899,7 +912,7 @@ rotate = page->getRotate(); PDFRectangle *pagebox; // write the Page header -@@ -886,7 +863,7 @@ +@@ -886,7 +872,7 @@ pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); } if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { @@ -908,7 +921,7 @@ if (info.isRef()) { // the info dict must be indirect (PDF Ref p. 61) pdf_printf("/%s.InfoDict ", pdfkeyprefix); -@@ -942,14 +919,14 @@ +@@ -942,14 +928,14 @@ pdf_puts(stripzeros(s)); // Metadata validity check (as a stream it must be indirect) @@ -927,7 +940,7 @@ pdf_newline(); pdf_printf("/%s ", pageDictKeys[i]); copyObject(&dictObj); // preserves indirection -@@ -957,8 +934,8 @@ +@@ -957,8 +943,8 @@ } // handle page group @@ -938,7 +951,7 @@ if (pdfpagegroupval == 0) { // another pdf with page group was included earlier on the // same page; copy the Group entry as is. See manual for -@@ -972,11 +949,11 @@ +@@ -972,11 +958,11 @@ copyObject(&dictObj); } else { // write Group dict as a separate object, since the Page dict also refers to it @@ -953,7 +966,7 @@ pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); } } -@@ -989,15 +966,15 @@ +@@ -989,15 +975,15 @@ pdftex_warn ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); } else { @@ -975,7 +988,7 @@ if (strcmp("Font", key) == 0) copyFontResources(&obj2); else if (strcmp("ProcSet", key) == 0) -@@ -1009,8 +986,8 @@ +@@ -1009,8 +995,8 @@ } // write the page contents @@ -986,7 +999,7 @@ // Variant A: get stream and recompress under control // of \pdfcompresslevel -@@ -1021,36 +998,35 @@ +@@ -1021,36 +1007,35 @@ // Variant B: copy stream without recompressing //