(*** This bug was imported into bugs.kde.org ***) Package: konsole Version: 1.1 (using KDE 3.0.0 ) Severity: normal Installed from: Red Hat Linux 7.2.93 Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110) OS: Linux (i686) release 2.4.18-5 OS/Compiler notes: using mc from konsole not display graphical chars I see unreadable char. I use mc -a for disable graph char for line drawing. usign mc from xterm in kde work propely. (Submitted via bugs.kde.org) (Called from KBugReport dialog)
Hello the bug seems to be related to QT. Version 3.0.6 snapshot from qt-copy has the problem while "old" 3.0.4 qt-copy is ok here. Also bugs #45250 and #44993 are connected I think. Ciao Matthias
*** Bug 45250 has been marked as a duplicate of this bug. ***
This bug is due to a change in qt-3.0.5, in qfont_x11.cpp, function sampleCharacter. This function picks a sample character for a script to test if particular script is present in the font. For GeometricSymbols script it picks unicode character 0x25a1, which is not present in "linux" font. Thus Qt thinks line-drawing characters are not present in the font, and doesn't display them. In previous versions of Qt it picked char 0x2500, which is present in Linux font, and thus everything used to work. Need to either add character 0x25a1 to the font, or patch Qt.
Seems that with Qt 3.0.5 the only way to see line-drawing chars in konsole is to use iso10646 (unicode) fonts. But those are absolutely unusable on slow X terminals - if I configure xfs to provide unicode fonts, start time of KDE programs on some our terminals increasze from 5 seconds to 1-2 minutes.
I've spent several hours tracing qt with gdb. This is the result. If unicode (iso10646-1) fonts are available, Qt uses those, and linedrawing characters work ok. The problem starts if unicode fonts are not available. In this case, at some point Qt tries to load font for "GeometricSymbols" "script" using QFontPrivate::load(). This function uses a static table named script_table (defined in src/kernel/qfont_x11.cpp) to find out which encodings do provide which "scripts". In that table there are no encodings that provide "GeometricSymbols". So QFontPrivate::load() fails, I don't know what is the correct way to fix. I used the following workaround. We use russian locale here, and truetype fonts we use here, when referenced as koi8-r in appropriate fonts.dir, do provide geometric symbols in range 0x80-0x9F. So i fixed script_table structure such that "GeometricSymbols" "script" is provided by "koi8-r" encoding. I also had to fix sampleCharacter() as noted above to make 0x2502 as a sample character for "GeometricSymbols" With qt recompiled with those changes, konsole does draw mc correctly when truetype fonts are used. This is an ugly workaround, but it works.
I believe this was recently fixed for KDE 3.4