summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-22 17:13:39 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-06-24 11:00:04 +0200
commit82ec493928ae35d224ffdc735fd8e427c390610c (patch)
treea8cab91c58d7ac4b4f5a1af784270ec7bf9018de
parentResolves: tdf#143008 Evaluate AM/PM for type date+time text-to-column and CSV (diff)
downloadcore-82ec493928ae35d224ffdc735fd8e427c390610c.tar.gz
core-82ec493928ae35d224ffdc735fd8e427c390610c.zip
disable ligatures for monospace fonts
we don't want e.g. a ffi ligature for Courier/Nimbus Mono PS Change-Id: I292c6e2ea217b511b4affcd8dab4a4bda85ab5da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117644 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 744e964619b5c49870ceab7f59daf1272f24cf75) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117713 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 998e07169c51..3ff45ef722b7 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -333,6 +333,12 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs, const SalLayoutGlyphs*
maFeatures.push_back({ HB_TAG('k','e','r','n'), 0, 0, static_cast<unsigned int>(-1) });
}
+ if (rFontSelData.GetPitch() == PITCH_FIXED)
+ {
+ SAL_INFO("vcl.harfbuzz", "Disabling ligatures for font: " << rFontSelData.maTargetName);
+ maFeatures.push_back({ HB_TAG('l','i','g','a'), 0, 0, static_cast<unsigned int>(-1) });
+ }
+
ParseFeatures(rFontSelData.maTargetName);
double nXScale = 0;