summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2024-01-11 01:26:04 +0000
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-29 08:20:20 +0100
commit18a1c3d6c98348d4e3da6e6c9740d6923ab2fba1 (patch)
tree8646b4c51a570daed3701ac49f8442b2a6ea1cca
parentc78679b349573d718f8641071928d5f2edb47efa (diff)
tdf#113050 poppler: Enable splash
Enable the splash module, to be used in the xpdf conversion for tiled patterns. I've jumped through a couple of hoops to avoid splash bringing in freetype, extending the existing hack. This might cause us problems if someone tries to use text as a tile, but otherwise isOK. Change-Id: I76ad1268f44137ae5e3205d56170c3a7c55a2dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--external/poppler/StaticLibrary_poppler.mk13
-rw-r--r--external/poppler/disable-freetype.patch.168
-rw-r--r--external/poppler/poppler-config.patch.12
3 files changed, 82 insertions, 1 deletions
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index 7b6f958245ac..726663d983a4 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -136,6 +136,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/SecurityHandler \
UnpackedTarball/poppler/poppler/SignatureInfo \
UnpackedTarball/poppler/poppler/Sound \
+ UnpackedTarball/poppler/poppler/SplashOutputDev \
UnpackedTarball/poppler/poppler/Stream \
UnpackedTarball/poppler/poppler/StructElement \
UnpackedTarball/poppler/poppler/StructTreeRoot \
@@ -146,7 +147,19 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/UnicodeTypeTable \
UnpackedTarball/poppler/poppler/ViewerPreferences \
UnpackedTarball/poppler/poppler/XRef \
+ UnpackedTarball/poppler/splash/Splash \
UnpackedTarball/poppler/splash/SplashBitmap \
+ UnpackedTarball/poppler/splash/SplashClip \
+ UnpackedTarball/poppler/splash/SplashFont \
+ UnpackedTarball/poppler/splash/SplashFontEngine \
+ UnpackedTarball/poppler/splash/SplashFontFile \
+ UnpackedTarball/poppler/splash/SplashFontFileID \
+ UnpackedTarball/poppler/splash/SplashPath \
+ UnpackedTarball/poppler/splash/SplashPattern \
+ UnpackedTarball/poppler/splash/SplashScreen \
+ UnpackedTarball/poppler/splash/SplashState \
+ UnpackedTarball/poppler/splash/SplashXPath \
+ UnpackedTarball/poppler/splash/SplashXPathScanner \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
index 3c4d1d0f7a8a..d12374f088f9 100644
--- a/external/poppler/disable-freetype.patch.1
+++ b/external/poppler/disable-freetype.patch.1
@@ -39,3 +39,71 @@ disable freetype dependent code
}
std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const
+--- poppler/splash/SplashFontEngine.cc.orig 2024-02-21 01:28:10.479645185 +0000
++++ popller/splash/SplashFontEngine.cc 2023-09-05 22:15:14.000000000 +0100
+@@ -66,9 +66,9 @@
+ delete font;
+ }
+
+- if (ftEngine) {
+- delete ftEngine;
+- }
++ //if (ftEngine) {
++ // delete ftEngine;
++ //}
+ }
+
+ SplashFontFile *SplashFontEngine::getFontFile(SplashFontFileID *id)
+--- poppler/splash/SplashFTFontEngine.h.orig 2023-09-05 22:15:14.000000000 +0100
++++ poppler/splash/SplashFTFontEngine.h 2024-02-21 13:53:29.715423742 +0000
+@@ -26,8 +26,8 @@
+ #ifndef SPLASHFTFONTENGINE_H
+ #define SPLASHFTFONTENGINE_H
+
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
++//#include <ft2build.h>
++//#include FT_FREETYPE_H
+
+ class SplashFontFile;
+ class SplashFontFileID;
+@@ -40,7 +40,7 @@
+ class SplashFTFontEngine
+ {
+ public:
+- static SplashFTFontEngine *init(bool aaA, bool enableFreeTypeHintingA, bool enableSlightHinting);
++ static SplashFTFontEngine *init(bool aaA, bool enableFreeTypeHintingA, bool enableSlightHinting) { return nullptr; };
+
+ ~SplashFTFontEngine();
+
+@@ -48,22 +48,22 @@
+ SplashFTFontEngine &operator=(const SplashFTFontEngine &) = delete;
+
+ // Load fonts.
+- SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
+- SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
+- SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
+- SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
+- SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src, int *codeToGID, int codeToGIDLen);
+- SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, int *codeToGID, int codeToGIDLen, int faceIndex = 0);
++ SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc) { return nullptr; };
++ SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc) { return nullptr; };
++ SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc) { return nullptr; };
++ SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src) { return nullptr; };
++ SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src, int *codeToGID, int codeToGIDLen) { return nullptr; };
++ SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, int *codeToGID, int codeToGIDLen, int faceIndex = 0) { return nullptr; };
+ bool getAA() { return aa; }
+ void setAA(bool aaA) { aa = aaA; }
+
+ private:
+- SplashFTFontEngine(bool aaA, bool enableFreeTypeHintingA, bool enableSlightHintingA, FT_Library libA);
++ //SplashFTFontEngine(bool aaA, bool enableFreeTypeHintingA, bool enableSlightHintingA, FT_Library libA);
+
+ bool aa;
+ bool enableFreeTypeHinting;
+ bool enableSlightHinting;
+- FT_Library lib;
++ //FT_Library lib;
+
+ friend class SplashFTFontFile;
+ friend class SplashFTFont;
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index 8f71e987b2b9..3604b1c16246 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -2,7 +2,7 @@
note: to get the 3rd one, use -DENABLE_CPP=on
-mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off
+mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=on -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off
manually disabled these because cmake failed to do it:
HAVE_CAIRO