scribus: fix patch

This commit is contained in:
tranzystorekk 2025-03-02 12:53:03 +01:00
parent 349edfad4e
commit 1c30652e76

View file

@ -17,7 +17,7 @@ index 92539d1..ac8e2eb 100644
{
for (int i = 0; i < order->getLength (); ++i)
diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
index b922816..b3d35f0 100644
index b922816..7ae96a8 100644
--- a/scribus/plugins/import/pdf/importpdfconfig.h
+++ b/scribus/plugins/import/pdf/importpdfconfig.h
@@ -15,6 +15,12 @@ for which a new license (GPL+exception) is in place.
@ -34,7 +34,7 @@ index b922816..b3d35f0 100644
#define POPPLER_CONST_082 const
#else
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
index 0244c9f..72e11b4 100644
index 0244c9f..09a90f3 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -2932,7 +2932,7 @@ void SlaOutputDev::beginMarkedContent(const char *name, Object *dictRef)
@ -148,24 +148,24 @@ index 0244c9f..72e11b4 100644
if (! ff)
goto err2;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
- codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
- ff.reset();
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get());
#else
+#else
codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
+#endif
ff.reset();
-#else
- codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
- delete ff;
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
#endif
+ ff.reset();
}
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
-#endif
+ }
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
}
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
{