summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-07-08 22:42:12 +0300
committerخالد حسني <khaled@libreoffice.org>2023-07-09 12:02:28 +0200
commitf9b16330f13d3ad43de6de026206577bfa1ac85d (patch)
tree304b3ae825686e3ce4ccb7af01e17b6483dc7bf1
parent1f24d35033c2f02335ce254bbcf6ba89e1b7565e (diff)
tdf#151273, tdf#151925: Don’t use QFont text layout by default
We were enabling QFont for qt5 VCL plugin by default, but it is buggy and some distributions seem to enabled qt5 VCL plugin even if we don't recommend it. Since the QFont code is incomplete and no one is working on it, lets make people’s life easier by making it always off by default. This removed the SAL_VCL_QT5_USE_CAIRO envvar and replaces it with SAL_VCL_QT_USE_QFONT that does the reverse. Also SAL_VCL_KF5_USE_QFONT is dropped in favor of SAL_VCL_QT_USE_QFONT. Change-Id: Id7471acd12fe277908f567140b63ae8d27b03033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154222 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
-rw-r--r--static/emscripten/environment.js1
-rw-r--r--vcl/README.vars.md6
-rw-r--r--vcl/qt5/QtInstance.cxx2
-rw-r--r--vcl/unx/kf5/KFSalInstance.cxx2
4 files changed, 3 insertions, 8 deletions
diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js
index bc60fddcbbe3..7d04fd76b0f2 100644
--- a/static/emscripten/environment.js
+++ b/static/emscripten/environment.js
@@ -1,5 +1,4 @@
if (!('preRun' in Module)) Module['preRun'] = [];
Module.preRun.push(function() {
ENV.SAL_LOG = "+WARN"
- ENV.SAL_VCL_QT5_USE_CAIRO = "1"
});
diff --git a/vcl/README.vars.md b/vcl/README.vars.md
index a2ede5a40855..0fa1a9505cd3 100644
--- a/vcl/README.vars.md
+++ b/vcl/README.vars.md
@@ -63,11 +63,7 @@ will be used to write the log under `instdir/uitest/`.
* `QT_SCALE_FACTOR=2` - for HiDPI testing (also supports float)
* `SAL_VCL_QT5_NO_FONTCONFIG` - ignore fontconfig provided font substitutions
* `SAL_VCL_QT5_NO_NATIVE` - disable `QStyle`'d controls
-* `SAL_VCL_QT5_USE_CAIRO` - use cairo for text rendering and fonts (default for kf5, but not qt5)
-
-## Kf5
-
-* `SAL_VCL_KF5_USE_QFONT` - use `QFont` for text rendering (default for qt5, but not kf5)
+* `SAL_VCL_QT_USE_QFONT` - use `QFont` for text layout and rendering (default is to use cairo)
## Mac
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 9c4d3def970e..df3df5d17a74 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -751,7 +751,7 @@ void QtInstance::setActivePopup(QtFrame* pFrame)
extern "C" {
VCLPLUG_QT_PUBLIC SalInstance* create_SalInstance()
{
- static const bool bUseCairo = (nullptr != getenv("SAL_VCL_QT5_USE_CAIRO"));
+ static const bool bUseCairo = (nullptr == getenv("SAL_VCL_QT_USE_QFONT"));
std::unique_ptr<char* []> pFakeArgv;
std::unique_ptr<int> pFakeArgc;
diff --git a/vcl/unx/kf5/KFSalInstance.cxx b/vcl/unx/kf5/KFSalInstance.cxx
index bec23cc2a6af..b52faf4b2070 100644
--- a/vcl/unx/kf5/KFSalInstance.cxx
+++ b/vcl/unx/kf5/KFSalInstance.cxx
@@ -73,7 +73,7 @@ KFSalInstance::createPicker(css::uno::Reference<css::uno::XComponentContext> con
extern "C" {
VCLPLUG_KF_PUBLIC SalInstance* create_SalInstance()
{
- static const bool bUseCairo = (nullptr == getenv("SAL_VCL_KF5_USE_QFONT"));
+ static const bool bUseCairo = (nullptr == getenv("SAL_VCL_QT_USE_QFONT"));
std::unique_ptr<char* []> pFakeArgv;
std::unique_ptr<int> pFakeArgc;