Broken fonts in Konsole KDE 4.3.4

2

1

I have a strange situation - after some upgrades a 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 the 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:

Konsole screenshot

GNOME Terminal shot:

Gnome terminal screenshot

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.

Any idea on what should I do to make it work sanely again?

user7385

Posted 2009-12-08T19:57:54.557

Reputation:

Answers

1

Is UTF8 locale set in your /etc files?

Should be something like the following

/etc/rc.conf:

LOCALE="en_US.utf8" 
KEYMAP="en" 

/etc/profile: e

xport LANG="en_US.utf8" 
export LANGUAGE="en_US.utf8" 

/etc/locale.gen:

en_US.UTF-8     UTF-8 

dag729

Posted 2009-12-08T19:57:54.557

Reputation: 1 894

1

Probably a Qt bug.

Polish characters of Terminus font not rendered properly

I've created a very simple Qt application (source code available on gist). It creates a few buttons, each with the same text (normal characters in the first line, polish characters in the second line). Each button has Terminus font of different size.

When I just run the program, the polish characters are rendered using different font (probably some default one) for some of the sizes. When I set LANG variable to "pl" and run the program, all characters are rendered properly. When I change dpi from 96 (default) to something else, e.g. 97, and run the program, all characters are rendered properly.

I checked this on two machines: Debian Testing (Qt 4.7.3) and Ubuntu Lucid (Qt 4.6.2). The behaviour is the same, screenshots are in attachments.

danadam

Posted 2009-12-08T19:57:54.557

Reputation: 375

1

What happens when you type:

  % locale

?

Depending on your distro, you'll need an UTF-8 locale.

g33kz0r

Posted 2009-12-08T19:57:54.557

Reputation: 284

=$ locale LANG=en_US.utf8 LC_CTYPE="en_US.utf8" LC_NUMERIC="en_US.utf8" LC_TIME="en_US.utf8" LC_COLLATE="en_US.utf8" LC_MONETARY="en_US.utf8" LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT="en_US.utf8" LC_IDENTIFICATION="en_US.utf8" – None – 2009-12-08T20:28:01.140

Are you using a TTF font or the ones from here: http://www.is-vn.bg/hamster/?

– g33kz0r – 2009-12-10T20:26:58.100

1

Some ideas, just guesswork in increasing order of destructiveness. I don't have Arch, so can't test it. Please make backups beforehand.

  1. Refresh font caches. Restart konsole.

    sudo fc-cache -srv
    fc-cache -rv
    
  2. Run qtconfig and mess with the font substitution. Restart konsole.

  3. Add the following to your xorg.conf, and accordingly any other paths with font files that your system has, and restart your X session.

    Section "Files"
      FontPath     "/usr/share/fonts/local"
      FontPath     "/usr/share/fonts/Type1"
      FontPath     "/usr/share/fonts/URW"
      FontPath     "/usr/share/fonts/truetype"
      FontPath     "/usr/share/fonts/xtest"
      FontPath     "/opt/kde3/share/fonts"
    EndSection
    
  4. Log out of your desktop session and move ~/.qt, ~/.kderc, ~/.fonts, ~/.fonts.conf, /etc/fonts/local.conf away. (If you had user-installed font files in ~/.fonts, you can keep those - usual extensions are .ttf and .pcf.) Refresh font caches as above and log in. You have to reapply or redo some font or font-related settings.

daxim

Posted 2009-12-08T19:57:54.557

Reputation: 1 072

fc-cache - didn't help. as for removal of files - i created new user, and it is also broken on this new account. as for doing font substitutions - i don't want to substitute - i want to use terminus, as it's nice, readable font. – None – 2009-12-10T13:12:19.163