[Konsole-devel] [Bug 50901] fonts like lucidasanstypewriter do not work in konsole

Devendra Deshpande devendra at cadence.com
Mon Dec 2 05:35:49 UTC 2002


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=50901     




------- Additional Comments From devendra at cadence.com  2002-12-02 06:35 -------
Subject: More on fixed-width fonts in konsole problem (on Solaris 2.7)

Hmmm,

I enabled a few debug lines (commented printf commands) in TEWidget.cpp,
TEWidget::fontChange and I see:

font: Screen,10,-1,5,50,0,0,0,1,0
fixed: yes
font_h: 14
font_w: 9
font_a: 10
rawname: -sun-screen-medium-r-normal--12-120-72-72-m-70-iso8859-1

So Knsole thinks (as Qt told it) that width of the font is 9. The 
window size is 80x24, and the window width is 738 (9*80 = 720 + some 
width for scrollbar).

But actually, the font width is 7! I can confirm this with rxvt.

The problem could be with Qt (Qt is giving the wrong value).

I change this loop in TEWidget::fontChange:

  int fw;
  font_w = 1;
  for(int i=0;i<128;i++) {
    if( isprint(i) && font_w < (fw = fm.width(i)))
      font_w = fw;
  }

to:

  int fw;
  font_w = 1;
  for(int i=0;i<128;i++) {
    if( isprint(i) && font_w < (fw = fm.width(i)))
      printf("intermediate fw: %d (i=%d)\n",fw, i);
      font_w = fw;
  }

and I see:

intermediate fw: 9 (i=9)
font: Screen,10,-1,5,50,0,0,0,1,0
fixed: yes
font_h: 14
font_w: 7
font_a: 10
rawname: -sun-screen-medium-r-normal--12-120-72-72-m-70-iso8859-1

Whew!

I don't know what happened or what did the trick, but Konsole works
with the screen and typewriter fonts now!!

Any clues as to what might be happening?

Thanks,
Devendra



More information about the konsole-devel mailing list