[prev in list] [next in list] [prev in thread] [next in thread]
List: kde3alpha
Subject: [Kde3alpha] konsole bug
From: Ghiora Drori <drori () edrori ! com>
Date: 2001-10-24 21:23:45
[Download RAW message or body]
When running konsole(KDE 3) I get a crash, I traced it to the following
code:
void Konsole::setFont(int fontno)
{
QFont f;
QFontMetrics fm1(f);
int font_w;
font_w = fm1.maxWidth();
cout << "font_w31:" <<font_w << "\n"; // This returns 12
if (fontno == DEFAULTFONT)
f = defaultFont;
else
if (fonts[fontno][0] == '-')
f.setRawName( fonts[fontno] );
else
{
f.setFamily(fonts[fontno]);
f.setRawMode( TRUE );
}
QFontMetrics fm2(f);
font_w = fm2.maxWidth();
cout << "font_w32:" <<font_w << "\n"; // This returns 0 (Not good )
***************** End of relevent code ***************
The debugger shows:
p fonts
$2 = {0x808b9c0 "6x13", 0x808b9c5 "5x7", 0x808b9c9 "6x10", 0x808b9ce
"7x13",
0x808b9d3 "9x15", 0x808b9d8 "10x20",
0x808b9e0 "-misc-console-medium-r-normal--16-160-72-72-c-160-iso10646-1",
0x808ba20 "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1"}
So the code goes through :
f.setFamily(fonts[fontno]);
f.setRawMode( TRUE );
with fontno = 3 fonts[fontno]="7x13"
From the QT manual:
Warning: Do not use raw mode unless you really, really need it! In most
(if not all) cases, setRawName() is a much better choise.
However setRawName requires an XLFD , and "7x13" is not an XLFD so
this does not work.
Any ideas?
Ghiora
P.S I do have Hebrew as a second language on this system
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic