|
|
b30f531 |
diff -up texlive-base-20220321/source/configure.poppler-22.08.0 texlive-base-20220321/source/configure
|
|
|
b30f531 |
--- texlive-base-20220321/source/configure.poppler-22.08.0 2022-10-31 09:48:21.875540925 -0400
|
|
|
b30f531 |
+++ texlive-base-20220321/source/configure 2022-10-31 09:50:13.731220862 -0400
|
|
|
b30f531 |
@@ -23545,7 +23545,7 @@ printf %s "checking requested system \`x
|
|
|
b30f531 |
int
|
|
|
b30f531 |
main (void)
|
|
|
b30f531 |
{
|
|
|
b30f531 |
-GfxFont *gfxFont; gfxFont->decRefCnt();
|
|
|
b30f531 |
+GfxFont *gfxFont; gfxFont->getFlags();
|
|
|
b30f531 |
;
|
|
|
b30f531 |
return 0;
|
|
|
b30f531 |
}
|
|
|
b30f531 |
diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-22.08.0 texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc
|
|
|
b30f531 |
--- texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-22.08.0 2022-10-31 09:48:21.872540907 -0400
|
|
|
b30f531 |
+++ texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc 2022-10-31 09:48:21.876540932 -0400
|
|
|
b30f531 |
@@ -123,7 +123,7 @@ struct InObj {
|
|
|
b30f531 |
|
|
|
b30f531 |
struct UsedEncoding {
|
|
|
b30f531 |
int enc_objnum;
|
|
|
b30f531 |
- GfxFont *font;
|
|
|
b30f531 |
+ std::shared_ptr<GfxFont> font;
|
|
|
b30f531 |
UsedEncoding *next;
|
|
|
b30f531 |
};
|
|
|
b30f531 |
|
|
|
b30f531 |
@@ -167,8 +167,8 @@ static PdfDocument *find_add_document(ch
|
|
|
b30f531 |
p->file_name = xstrdup(file_name);
|
|
|
b30f531 |
p->xref = xref = 0;
|
|
|
b30f531 |
p->occurences = 0;
|
|
|
b30f531 |
- GString *docName = new GString(p->file_name);
|
|
|
b30f531 |
- p->doc = new PDFDoc(docName); // takes ownership of docName
|
|
|
b30f531 |
+ // GString *docName = new GString(p->file_name);
|
|
|
b30f531 |
+ p->doc = new PDFDoc(std::make_unique<GooString>(p->file_name)); // takes ownership of docName
|
|
|
b30f531 |
if (!p->doc->isOk() || !p->doc->okToPrint()) {
|
|
|
b30f531 |
pdftex_fail("xpdf: reading PDF image failed");
|
|
|
b30f531 |
}
|
|
|
b30f531 |
@@ -204,7 +204,7 @@ static void delete_document(PdfDocument
|
|
|
b30f531 |
|
|
|
b30f531 |
// --------------------------------------------------------------------
|
|
|
b30f531 |
|
|
|
b30f531 |
-static int addEncoding(GfxFont * gfont)
|
|
|
b30f531 |
+static int addEncoding(std::shared_ptr<GfxFont> gfont)
|
|
|
b30f531 |
{
|
|
|
b30f531 |
UsedEncoding *n;
|
|
|
b30f531 |
n = new UsedEncoding;
|
|
|
b30f531 |
@@ -395,7 +395,8 @@ static void copyFont(const char *tag, Ob
|
|
|
b30f531 |
{
|
|
|
b30f531 |
Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
|
|
|
b30f531 |
stemV;
|
|
|
b30f531 |
- GfxFont *gfont;
|
|
|
b30f531 |
+ // GfxFont *gfont;
|
|
|
b30f531 |
+ std::shared_ptr<GfxFont> gfont;
|
|
|
b30f531 |
fd_entry *fd;
|
|
|
b30f531 |
fm_entry *fontmap;
|
|
|
b30f531 |
// Check whether the font has already been embedded before analysing it.
|
|
|
b30f531 |
@@ -666,6 +667,7 @@ static void writeEncodings()
|
|
|
b30f531 |
UsedEncoding *r, *n;
|
|
|
b30f531 |
char *glyphNames[256], *s;
|
|
|
b30f531 |
int i;
|
|
|
b30f531 |
+
|
|
|
b30f531 |
for (r = encodingList; r != 0; r = r->next) {
|
|
|
b30f531 |
for (i = 0; i < 256; i++) {
|
|
|
b30f531 |
if (r->font->isCIDFont()) {
|
|
|
b30f531 |
@@ -673,7 +675,8 @@ static void writeEncodings()
|
|
|
b30f531 |
("PDF inclusion: CID fonts are not supported"
|
|
|
b30f531 |
" (try to disable font replacement to fix this)");
|
|
|
b30f531 |
}
|
|
|
b30f531 |
- if ((s = (char *) ((Gfx8BitFont *) r->font)->getCharName(i)) != 0)
|
|
|
b30f531 |
+ const GfxFont *const font = r->font.get();
|
|
|
b30f531 |
+ if ((s = (char *) ((Gfx8BitFont *) font)->getCharName(i)) != 0)
|
|
|
b30f531 |
glyphNames[i] = s;
|
|
|
b30f531 |
else
|
|
|
b30f531 |
glyphNames[i] = notdef;
|
|
|
b30f531 |
@@ -682,7 +685,7 @@ static void writeEncodings()
|
|
|
b30f531 |
}
|
|
|
b30f531 |
for (r = encodingList; r != 0; r = n) {
|
|
|
b30f531 |
n = r->next;
|
|
|
b30f531 |
- r->font->decRefCnt();
|
|
|
b30f531 |
+ // r->font->decRefCnt();
|
|
|
b30f531 |
delete r;
|
|
|
b30f531 |
}
|
|
|
b30f531 |
}
|
|
|
b30f531 |
diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-22.08.0 texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc
|
|
|
b30f531 |
--- texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-22.08.0 2022-10-31 09:48:21.866540870 -0400
|
|
|
b30f531 |
+++ texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc 2022-10-31 09:48:21.876540932 -0400
|
|
|
b30f531 |
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
|
|
b30f531 |
{
|
|
|
b30f531 |
char *p, buf[1024];
|
|
|
b30f531 |
PDFDoc *doc;
|
|
|
b30f531 |
- GString *fileName;
|
|
|
b30f531 |
+ std::unique_ptr<GooString> fileName;
|
|
|
b30f531 |
Stream *s;
|
|
|
b30f531 |
Object srcStream, srcName, catalogDict;
|
|
|
b30f531 |
FILE *outfile;
|
|
|
b30f531 |
@@ -86,9 +86,9 @@ int main(int argc, char *argv[])
|
|
|
b30f531 |
"Usage: pdftosrc <PDF-file> [<stream-object-number>]\n");
|
|
|
b30f531 |
exit(1);
|
|
|
b30f531 |
}
|
|
|
b30f531 |
- fileName = new GString(argv[1]);
|
|
|
b30f531 |
+ fileName = std::make_unique<GString>(argv[1]);
|
|
|
b30f531 |
globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
|
|
|
b30f531 |
- doc = new PDFDoc(fileName);
|
|
|
b30f531 |
+ doc = new PDFDoc(std::move(fileName));
|
|
|
b30f531 |
if (!doc->isOk()) {
|
|
|
b30f531 |
fprintf(stderr, "Invalid PDF file\n");
|
|
|
b30f531 |
exit(1);
|
|
|
b30f531 |
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
|
|
|
b30f531 |
fprintf(stderr, "Not a Stream object\n");
|
|
|
b30f531 |
exit(1);
|
|
|
b30f531 |
}
|
|
|
b30f531 |
- sprintf(buf, "%s", fileName->c_str());
|
|
|
b30f531 |
+ sprintf(buf, "%s", argv[1]);
|
|
|
b30f531 |
if ((p = strrchr(buf, '.')) == 0)
|
|
|
b30f531 |
p = strchr(buf, 0);
|
|
|
b30f531 |
if (objgen == 0)
|
|
|
b30f531 |
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
|
|
|
b30f531 |
outname = buf;
|
|
|
b30f531 |
} else { // objnum < 0 means we are extracting the XRef table
|
|
|
b30f531 |
extract_xref_table = true;
|
|
|
b30f531 |
- sprintf(buf, "%s", fileName->c_str());
|
|
|
b30f531 |
+ sprintf(buf, "%s", argv[1]);
|
|
|
b30f531 |
if ((p = strrchr(buf, '.')) == 0)
|
|
|
b30f531 |
p = strchr(buf, 0);
|
|
|
b30f531 |
sprintf(p, ".xref");
|