From e27b89f4efecd2c54480d3544bb2c02c39b865ca Mon Sep 17 00:00:00 2001 From: Pavel Khlebovich Date: Tue, 4 Oct 2016 12:37:43 +0300 Subject: [PATCH] Remove widget size checks in setVTFont() (#86) --- lib/TerminalDisplay.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 4f7e0aa..aeebc7e 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -262,21 +262,18 @@ void TerminalDisplay::setVTFont(const QFont& f) qDebug() << "Using a variable-width font in the terminal. This may cause performance degradation and display/alignment errors."; } - if ( metrics.height() < height() && metrics.maxWidth() < width() ) - { - // hint that text should be drawn without anti-aliasing. - // depending on the user's font configuration, this may not be respected - if (!_antialiasText) - font.setStyleStrategy( QFont::NoAntialias ); + // hint that text should be drawn without anti-aliasing. + // depending on the user's font configuration, this may not be respected + if (!_antialiasText) + font.setStyleStrategy( QFont::NoAntialias ); - // experimental optimization. Konsole assumes that the terminal is using a - // mono-spaced font, in which case kerning information should have an effect. - // Disabling kerning saves some computation when rendering text. - font.setKerning(false); + // experimental optimization. Konsole assumes that the terminal is using a + // mono-spaced font, in which case kerning information should have an effect. + // Disabling kerning saves some computation when rendering text. + font.setKerning(false); - QWidget::setFont(font); - fontChange(font); - } + QWidget::setFont(font); + fontChange(font); } void TerminalDisplay::setFont(const QFont &)