|
From: | Doug Stewart |
Subject: | Re: GUI font and cursor location |
Date: | Mon, 30 Jul 2012 21:33:18 -0400 |
On Mon, Jul 30, 2012 at 03:27:22PM +0100, Michael Goffioul wrote:Yep, that fixes it for me, including FreeMono, and the floating-point
> Thanks, these are very interesting findings. I'm also using 4.8.2 under
> Fedora, but it's possible that the packager has tweaked the package to
> change some default behavior, or it is part of the Qt style, I don't know.
> But if it is some system settings, it is possible those are different under
> Ubuntu (afaik both of you, Doug and Mike, are using Ubuntu). The link:
>
> https://git.reviewboard.kde.org/r/102899/
>
> contains a konsole patch ("View Diff" tab in the top-right corner of the
> yellow area). Could you apply the change to TerminalView.cpp and give it a
> try. I tried it, but it didn't solve the problem with the FreeMono font
> (the only one showing the problem for me), but maybe it'll help for you for
> the other fonts. Note also that I tried FreeMono in konsole and it's full
> of misalignment, so I guess here the font is the problem.
height and width are not needed anymore. Since Doug and I were seeing
the exact same problem (he on Ubuntu and I on Debian) I assume this will
fix it for him too. Doug, can you confirm?
If everyone's happy, Jacob, can you revert f91e00f and apply this?
>From 08100e0e24914f2a0ae96fe84c1a05c906e98d1a Mon Sep 17 00:00:00 2001
From: Mike Miller <address@hidden>
Date: Mon, 30 Jul 2012 20:57:58 -0400
Subject: [PATCH] Terminal requires integer font metrics
Patch taken from konsole git commit de5ef94.
---
libqterminal/unix/TerminalView.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libqterminal/unix/TerminalView.cpp b/libqterminal/unix/TerminalView.cpp
index 45590a5..3409cba 100644
--- a/libqterminal/unix/TerminalView.cpp
+++ b/libqterminal/unix/TerminalView.cpp
@@ -210,6 +210,9 @@ void TerminalView::setVTFont(const QFont& f)
// Disabling kerning saves some computation when rendering text.
// font.setKerning(false);
+ // Konsole cannot handle non-integer font metrics
+ font.setStyleStrategy(QFont::StyleStrategy(font.styleStrategy() | QFont::ForceIntegerMetrics));
+
QWidget::setFont(font);
fontChange(font);
}
--
1.7.10.4
--
mike
[Prev in Thread] | Current Thread | [Next in Thread] |