summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorFrank Steiner <fsteiner-board@bio.ifi.lmu.de>2023-11-23 14:31:10 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-11-24 09:45:29 +0100
commit9137bd2dd3ab66ffa783fc15a1add1e9cf541460 (patch)
treeecf5819c8beef005774e8b6daa9a8d80ef0b35d1 /vcl/qt5
parentc8b21dd6a310ff4fb1dd53c6930768fda34dda4b (diff)
enable using medium/full font hinting even with subpixel positioning
Change-Id: I1be0670d59163070dccf035ec9c7b0cd4f818c69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159766 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtGraphics_Text.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/qt5/QtGraphics_Text.cxx b/vcl/qt5/QtGraphics_Text.cxx
index c7486da26d2e..19837d510f13 100644
--- a/vcl/qt5/QtGraphics_Text.cxx
+++ b/vcl/qt5/QtGraphics_Text.cxx
@@ -160,8 +160,9 @@ std::unique_ptr<GenericSalLayout> QtGraphics::GetTextLayout(int nFallbackLevel)
static QRawFont GetRawFont(const QFont& rFont, bool bWithoutHintingInTextDirection)
{
QFont::HintingPreference eHinting = rFont.hintingPreference();
+ static bool bAllowDefaultHinting = getenv("SAL_ALLOW_DEFAULT_HINTING") != nullptr;
bool bAllowedHintStyle
- = !bWithoutHintingInTextDirection
+ = !bWithoutHintingInTextDirection || bAllowDefaultHinting
|| (eHinting == QFont::PreferNoHinting || eHinting == QFont::PreferVerticalHinting);
if (bWithoutHintingInTextDirection && !bAllowedHintStyle)
{