@@ -200,23 +200,23 @@ void TerminalDisplay::setVTFont( const QFont& f )
200
200
201
201
QFontMetrics metrics ( font );
202
202
203
- if ( metrics.height () < height () && metrics.maxWidth () < width () )
204
- {
205
- // hint that text should be drawn without anti-aliasing.
206
- // depending on the user's font configuration, this may not be respected
207
- if ( !_antialiasText )
208
- font.setStyleStrategy ( QFont::NoAntialias );
209
-
210
- // experimental optimization. Konsole assumes that the terminal is using a
211
- // mono-spaced font, in which case kerning information should have an effect.
212
- // Disabling kerning saves some computation when rendering text.
213
- font.setKerning ( false );
214
- }
203
+ // The condition checking if font is smaller than widget was causing #7340 (cursor shift)
204
+ // probably because this was called before the widget was rendered and got its size
205
+ // if ( metrics.height() < height() && metrics.maxWidth() < width() )
206
+ // {
207
+ // hint that text should be drawn without anti-aliasing.
208
+ // depending on the user's font configuration, this may not be respected
209
+ if ( !_antialiasText )
210
+ font.setStyleStrategy ( QFont::NoAntialias );
211
+
212
+ // experimental optimization. Konsole assumes that the terminal is using a
213
+ // mono-spaced font, in which case kerning information should have an effect.
214
+ // Disabling kerning saves some computation when rendering text.
215
+ font.setKerning ( false );
215
216
216
- // This was in the block above so that font was not properly set if called
217
- // before the widget was rendered and got its size and it was causing #7340 (cursor shift)
218
217
QWidget::setFont ( font );
219
218
fontChange ( font );
219
+ // }
220
220
}
221
221
222
222
void TerminalDisplay::setFont ( const QFont & )
0 commit comments