Bug 218230

Summary: National characters in konsole are broken
Product: [Applications] konsole Reporter: Hubert depesz Lubaczewski <depesz>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED UPSTREAM    
Severity: normal CC: adaptee, akordianowski, broken.zhou, danadam, depesz, joerg.schaible
Priority: NOR    
Version: 2.3.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Hubert depesz Lubaczewski 2009-12-11 05:17:23 UTC
Version:           2.3.3 (using KDE 4.3.4)
OS:                Linux
Installed from:    Archlinux Packages

I have strange situation - after some upgrade couple of days ago fonts in KDE konsole broke. To make it more specific - standard fonts look more or less ok, but when I use my national characters (like ąćęłńśóźż) they all look broken - like from another font, or badly scaled.

The same problem doesn't exist in gnome-terminal.

I usually use Terminus font, so I used this for demonstration, but it shows in other fonts as well - if that will be necessary I will provide list.

Konsole shot:

http://depesz.com/various/konsole-shot.png

gnome-terminal shot:

http://depesz.com/various/gnome-shot.png

As for my settings:

=$ cat /etc/X11/xorg.conf
Section "Device"
    Identifier  "Builtin Default intel Device 0"
    Driver  "intel"
EndSection
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection
Section "Screen"
    Identifier  "Builtin Default intel Screen 0"
    Device  "Builtin Default intel Device 0"
    Monitor "Monitor0"
EndSection
Section "InputDevice"
    Identifier  "touchpad"
    Driver  "synaptics"
    Option "CorePointer"
EndSection
Section "ServerLayout"
    Identifier  "Builtin Default Layout"
    Screen  "Builtin Default intel Screen 0"
    InputDevice "touchpad"
EndSection

=$ xdpyinfo | grep -E resolution\|dimensions
  dimensions:    1680x1050 pixels (444x277 millimeters)
  resolution:    96x96 dots per inch

I tried forcing DPI in system settings (to 120), or adding monitor size to xorg.conf - so far nothing helped.

I asked about it on arch forum (http://bbs.archlinux.org/viewtopic.php?pid=669229#p669229), SuperUser (http://superuser.com/questions/80533/broken-fonts-in-konsole-kde-4-3-4) and kde forum (http://forum.kde.org/viewtopic.php?f=66&t=84398) and I was told it looks like a bug, so I'm filling it.
Comment 1 Daniel Adamski 2010-01-20 21:49:19 UTC
I have the same problem:

http://danadam.pl/tmp/konsole-fonts-bug.png

also Terminus font. It looks good in gvim, looks wrong in konsole.

Debian Testing
KDE 4.3.4
Konsole 2.3.2
Comment 2 Jörg Schaible 2010-03-04 23:05:20 UTC
Same here, however it happened to me after upgrading from qt-4.5.3 to qt-4.6.2 for a KDE 4.3.5 system (Gentoo).
Comment 3 Adam Kordianowski 2010-03-10 13:20:13 UTC
Same here. Also when looking at Terminus in KDE FontViewer the set of characters is very limited (only Unicode Basic Latin and Latin-1 Supplement; no characters for Latin Extended-A and others).


ArchLinux
KDE 4.4.1
Konsole 2.4.1
Font Viewer 1.1
Qt 4.6.2
Comment 4 Daniel Adamski 2010-08-25 18:58:16 UTC
It seems to be fixed:

http://danadam.pl/tmp/konsole-fonts-bug-fixed.png

at least on:

Ubuntu 10.4
KDE 4.4.2
Konsole 2.4.2
Qt 4.6.2
Comment 5 Hubert depesz Lubaczewski 2010-09-28 12:01:14 UTC
I think it was fine for some time, but now I got it again.

Software stack:

Ubuntu 10.04.1 LTS
KDE 4.5.1
Konsole 2.5
Qt 4.7.0

Font: Terminus, size 9.
Comment 6 Daniel Adamski 2010-12-02 22:06:35 UTC
It is present on:

Debian Testing
KDE 4.4.5
Konsole 2.4.5
Qt 4.6.3
Comment 7 Daniel Adamski 2011-07-11 22:07:43 UTC
Still present in:

Debian Testing
KDE 4.6.4
Konsole 2.6.3
Qt 4.7.3
xfonts-terminus 4.30-2

Here's the screenshot of:

KWrite - KDE application
GEdti - Gnome/Gtk application
Psi - Qt application

http://danadam.pl/tmp/kde-fonts-bug.png

Only KWrite has problems, and only with polish national characters. German national characters are displayed correctly.
Comment 8 Jekyll Wu 2011-10-29 08:21:05 UTC
Well, the reported problem does exist, but after doing some investigation, I think this is basically a bug of Qt.

1). The Terminus font does contains the glyphs for "ąćęłńśóźż". This can be verified by opening ter-x12n.pcf.gz with fontforge.

2). However, the kfontview utility reports the Terminus font does not contain glyphs for "ąćęłńśóźż". This can be verified by examining the "Latin Extended A" block and "Latin-1 Supplement" block. Adam already mentioned that in comment #3.

3). The reported problem exists in every KDE/Qt apps I have tested. For example, choose Terminus in kate and paste the first paragraph of the original report, then those national characters are rendered in the similar way. Or, open the font selection dialog from any Qt app, choose the Terminus font and use "but when I use my national characters (like ąćęłńśóźż) they all look broken" as the sample text for previewing, then they are also rendered in the similar way.  

4). Gtk apps do not have this problem. This can be verified by using the Terminus font in gnome-terminal and gedit.

So the real problem is Qt does not think the Terminus font contains glyphs for those national characters, so it use glyphs from another font as substitution. That is why they looks like from another font. Of course, this is a bug when the Terminus font does contain those glyphs.

I am using:
KDE 4.7.2
Konsole 2.7.2(using UTF-8 as locale and encoding)
Qt 4.8.0rc1
Terminus-font 4.36
Comment 9 Daniel Adamski 2011-11-09 22:00:35 UTC
https://bugreports.qt.nokia.com/browse/QTBUG-9608
Comment 10 Yichao Zhou 2012-12-24 14:30:30 UTC
Confirmed in today's archlinux.