office-gobmx/external/poppler/disable-freetype.patch.1
Xisco Fauli 5265c69ed6 poppler: Upgrade 24.05.0
* external/poppler/char_traits.patch is no longer neeeded
after https://cgit.freedesktop.org/poppler/poppler/commit/cpp/poppler-global.h?id=b4ac7d9af7cb5edfcfcbda035ed8b8c218ba8564

* Adapt external/poppler/disable-nss-and-gpgmepp.patch.1
after https://cgit.freedesktop.org/poppler/poppler/commit/?id=d40bb7e308c9e3299e50d3e2880229cd6272587e

Downloaded from https://poppler.freedesktop.org/poppler-24.05.0.tar.xz

Change-Id: I87ed833f92e504f0a39b5f64c1db42d579050a37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167582
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-13 22:41:45 +02:00

109 lines
4.3 KiB
Groff

disable freetype dependent code
--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
+++ poppler/poppler/Form.cc 2023-06-14 18:50:22.232312300 +0900
@@ -48,7 +48,7 @@
#include <cstdlib>
#include <cstring>
#include <cctype>
-#include "goo/ft_utils.h"
+//#include "goo/ft_utils.h"
#include "goo/gmem.h"
#include "goo/gfile.h"
#include "goo/GooString.h"
@@ -78,8 +78,8 @@
#include "fofi/FoFiTrueType.h"
#include "fofi/FoFiIdentifier.h"
-#include <ft2build.h>
-#include FT_FREETYPE_H
+//#include <ft2build.h>
+//#include FT_FREETYPE_H
#include <unordered_set>
// helper for using std::visit to get a dependent false for static_asserts
@@ -2840,6 +2840,8 @@
Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle, bool forceName)
{
+ return {};
+#if 0
if (!filepath.ends_with(".ttf") && !filepath.ends_with(".ttc") && !filepath.ends_with(".otf")) {
error(errIO, -1, "We only support embedding ttf/ttc/otf fonts for now. The font file for {0:s} {1:s} was {2:s}", fontFamily.c_str(), fontStyle.c_str(), filepath.c_str());
return {};
@@ -2994,6 +2996,7 @@
}
return { dictFontName, fontDictRef };
+#endif
}
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;