summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-22 17:13:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-23 10:16:27 +0200
commit388d52a9193d89058f27b3efd48ab3cd5dedf0a7 (patch)
tree777f7c1bd81eccd1f11211ffb912d0fd109cbac3
parent1feb59c3dd9e5f714ce894f8de31bbb6869c9f3b (diff)
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/+/117669 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-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 801abdd16670..50ad02843887 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -351,6 +351,12 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs, const SalLayoutGlyphsIm
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;