From c880ab27d375ea847a17ad3f71e4194a1539a615 Mon Sep 17 00:00:00 2001 From: Marcus Britanicus Date: Mon, 26 Feb 2024 15:39:33 +0530 Subject: [PATCH] Fix issue cursor positioning issues --- lib/TerminalDisplay.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 3018f65a..0ccfb757 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -291,6 +291,15 @@ void TerminalDisplay::setVTFont(const QFont& f) // Disabling kerning saves some computation when rendering text. font.setKerning(false); + // QFont::ForceIntegerMetrics has been removed. + // Set full hinting instead to ensure the letters are aligned properly. + font.setHintingPreference(QFont::PreferFullHinting); + + // "Draw intense colors in bold font" feature needs to use different font weights. StyleName + // property, when set, doesn't allow weight changes. Since all properties (weight, stretch, + // italic, etc) are stored in QFont independently, in almost all cases styleName is not needed. + font.setStyleName(QString()); + QWidget::setFont(font); fontChange(font); }