Prepare for poppler-26.05.

This commit is contained in:
kili
2026-05-13 21:15:11 +00:00
parent e71683cb90
commit f232dc5bd2
4 changed files with 70 additions and 2 deletions
@@ -3,7 +3,7 @@ use system version ?
Index: CMakeLists_Dependencies.cmake
--- CMakeLists_Dependencies.cmake.orig
+++ CMakeLists_Dependencies.cmake
@@ -319,5 +319,6 @@ if (HARFBUZZ_SUBSET_FOUND)
@@ -318,5 +318,6 @@ if (HARFBUZZ_SUBSET_FOUND)
endif()
#if(WANT_QTADS)
@@ -15,7 +15,7 @@ Index: scribus/CMakeLists.txt
#endif()
link_directories(
@@ -293,7 +294,7 @@ target_link_libraries(${EXE_NAME} PRIVATE
@@ -294,7 +295,7 @@ target_link_libraries(${EXE_NAME} PRIVATE
)
#if(WANT_QTADS)
@@ -0,0 +1,16 @@
Fix build with poppler-26.05.
From svn r27545.
Index: scribus/plugins/import/pdf/importpdfconfig.h
--- scribus/plugins/import/pdf/importpdfconfig.h.orig
+++ scribus/plugins/import/pdf/importpdfconfig.h
@@ -21,4 +21,8 @@ for which a new license (GPL+exception) is in place.
#define POPPLER_CONST_25_02
#endif
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
+using SplashCoord = double;
+#endif
+
#endif
@@ -0,0 +1,52 @@
Fix build with poppler-26.05.
From svn r27545.
Index: scribus/plugins/import/pdf/slaoutput.cpp
--- scribus/plugins/import/pdf/slaoutput.cpp.orig
+++ scribus/plugins/import/pdf/slaoutput.cpp
@@ -3115,7 +3115,13 @@ void SlaOutputDev::updateFont(GfxState *state)
// load the font file
switch (fontType) {
case fontType1:
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
+ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), std::move(fontsrc), static_cast<Gfx8BitFont*>(gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
{
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
@@ -3136,7 +3142,13 @@ void SlaOutputDev::updateFont(GfxState *state)
#endif
break;
case fontType1C:
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
+ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), std::move(fontsrc), static_cast<Gfx8BitFont*>(gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
{
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
@@ -3157,7 +3169,13 @@ void SlaOutputDev::updateFont(GfxState *state)
#endif
break;
case fontType1COT:
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 5, 0)
+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), std::move(fontsrc), static_cast<Gfx8BitFont*>(gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
{
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");