Skip to content

Instantly share code, notes, and snippets.

@inzanity
Created March 3, 2017 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inzanity/2ff9ba5538bd9b37bb5afc9ebae7d34b to your computer and use it in GitHub Desktop.
Save inzanity/2ff9ba5538bd9b37bb5afc9ebae7d34b to your computer and use it in GitHub Desktop.
Fingerterm cursor position fix
diff --git a/textrender.cpp b/textrender.cpp
index ee1aff9..2eac738 100644
--- a/textrender.cpp
+++ b/textrender.cpp
@@ -76,6 +76,7 @@ TextRender::TextRender(QQuickItem *parent) :
iShowBufferScrollIndicator = false;
iFont = QFont(sUtil->fontFamily(), sUtil->fontSize());
+ iFont.setStyleHint(QFont::Monospace, QFont::StyleStrategy(QFont::PreferDefault | QFont::ForceIntegerMetrics));
iFont.setBold(false);
QFontMetrics fontMetrics(iFont);
iFontHeight = fontMetrics.height();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment