summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-08-17 19:57:58 +0100
committerMichael Meeks <michael.meeks@collabora.com>2020-08-19 14:23:38 +0200
commite8be3ec4d27d11e9583f39fa06e6ad785bea102c (patch)
treed9152c5b7ca7d7e1596c8f059c33c49aceb01fee
parent5923d4173d5000d3462fa6e55952bfc5101b6bfa (diff)
headless: don't allow the system to set subpixel rendering eg.
Change-Id: Id62c03938c88d70dabda6111b8a7cca3b175e31f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100875 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 985922fe1a5dfd9ce02f7d24c4083d9d69544951) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100805 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/headless/svpinst.cxx28
-rw-r--r--vcl/inc/headless/svpinst.hxx2
2 files changed, 25 insertions, 5 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 0e16d832659d..4893b8ddd44b 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -44,11 +44,12 @@
#include <headless/svpdummies.hxx>
#include <headless/svpvd.hxx>
#ifdef IOS
-#include <quartz/salbmp.h>
-#include <quartz/salgdi.h>
-#include <quartz/salvd.h>
+# include <quartz/salbmp.h>
+# include <quartz/salgdi.h>
+# include <quartz/salvd.h>
#else
-#include <headless/svpgdi.hxx>
+# include <cairo.h>
+# include <headless/svpgdi.hxx>
#endif
#include <headless/svpbmp.hxx>
@@ -267,6 +268,24 @@ cairo_surface_t* get_underlying_cairo_surface(const VirtualDevice& rDevice)
return static_cast<SvpSalVirtualDevice*>(rDevice.mpVirDev.get())->GetSurface();
}
+const cairo_font_options_t* SvpSalInstance::GetCairoFontOptions()
+{
+ static cairo_font_options_t *gOptions = nullptr;
+ if (!gOptions)
+ {
+ gOptions = cairo_font_options_create();
+ cairo_font_options_set_antialias(gOptions, CAIRO_ANTIALIAS_GRAY);
+ }
+ return gOptions;
+}
+
+#else // IOS
+
+const cairo_font_options_t* SvpSalInstance::GetCairoFontOptions()
+{
+ return nullptr;
+}
+
#endif
SalTimer* SvpSalInstance::CreateSalTimer()
@@ -610,7 +629,6 @@ OpenGLContext* SvpSalInstance::CreateOpenGLContext()
return nullptr;
}
-
#endif
SvpSalTimer::~SvpSalTimer()
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index ef20f0cab1b1..ae1290729b4c 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -176,6 +176,8 @@ public:
virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
virtual std::unique_ptr<GenPspGraphics> CreatePrintGraphics() override;
+
+ virtual const cairo_font_options_t* GetCairoFontOptions() override;
};
inline void SvpSalInstance::registerFrame( SalFrame* pFrame )