[Konsole-devel] Ridiculously large Konsole line spacing

John Stanley jpsinthemix at verizon.net
Wed Feb 4 07:44:07 UTC 2009


Hi Robert,
I think I have a temp work-around (at least for me anyway), by doing the 
following:

*** TerminalDisplay.cpp 2009-01-17 05:59:32.000000000 -0500
--- TerminalDisplay.cpp.new     2009-02-04 02:34:49.826402885 -0500
***************
*** 209,215 ****
  void TerminalDisplay::fontChange(const QFont&)
  {
    QFontMetrics fm(font());
!   _fontHeight = fm.height() + _lineSpacing;

    // waba TerminalDisplay 1.123:
    // "Base character width on widest ASCII character. This prevents 
too wide
--- 209,215 ----
  void TerminalDisplay::fontChange(const QFont&)
  {
    QFontMetrics fm(font());
!   _fontHeight = fm.lineSpacing()-1 + _lineSpacing;

    // waba TerminalDisplay 1.123:
    // "Base character width on widest ASCII character. This prevents 
too wide

Its not quite right, but a vast improvement and acceptable to me. Note 
that I left _lineSpacing(0) as is. This all seems peculiar tp me since 
linespacing() = height()+leading(). It seems to me from the 
TerminalDisplay.cpp code that Qt is doing the char rendering, and that 
the problem lies there... but I'm not sure.

John

Robert Knight wrote:
> Hi John,
>
>   
>> However, while this may seem a bit silly/trivial, does anyone know how
>> to modify line spacing in Konsole?
>>     
>
> There is no setting for it but since you built Konsole from source you
> could alter
> the default value for the _lineSpacing attribute in
> kdebase/apps/konsole/src/TerminalDisplay.cpp line 321
> to a small negative value.
>
> Someone else is currently investigating why the line spacing has
> changed between Qt 3 and Qt 4 for certain
> fonts but it might well be the case that I'll have to add a setting
> somewhere.  As I said, the problem only affects
> certain fonts.  Standard TTF ones (eg. DejaVu Sans Mono) are laid out okay.
>
> Regards,
> Robert.
>
> 2009/2/3 John Stanley <johnstops at verizon.net>:
>   
>> Hi all,
>> I just built and installed kde-4.2.0.  All 'n all, I'm rather impressed;
>> a vast improvement from version 4.0.x (the last version I tried).
>> However, while this may seem a bit silly/trivial, does anyone know how
>> to modify line spacing in Konsole?  For me, a comfortable console
>> emulator is probably the single most important app.  Until the current
>> 'way too large spacing' is made adjustable I really cannot use konsole--
>> I'd rather just stick with XFCE's Terminal instead.
>>
>> thanks much,
>> John
>> _______________________________________________
>> konsole-devel mailing list
>> konsole-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/konsole-devel
>>
>>     
>
>   



More information about the konsole-devel mailing list