Bug 221609

Summary: konsole default font causes wrong formatting and slow open
Product: [Applications] konsole Reporter: damian pereira <damipereira>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED REMIND    
Severity: normal CC: adaptee, Oliver, robertknight, urcindalo
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot of top with a font size of 11

Description damian pereira 2010-01-07 06:19:34 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I'm using kdemod-testing 4.3.85.

damian:~$ uname -a
Linux eee-pc 2.6.32-ARCH #1 SMP PREEMPT Sat Dec 26 08:26:17 UTC 2009 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux

Default font terminus shows this errors at determined font sizes (when opened in terminal):

konsole(2294) Konsole::TerminalDisplay::setVTFont: Using an unsupported variable-width font in the terminal.  This may produce display errors.

Under "Settings > Edit Current Profile > Appearance > Edit Font" the only font sizes available are:
9,11,12,15,18,21 and 24 of these the only one that doesn't work is 11,however in the font size slider in "Settings > Edit Current Profile > Appearance" all intermediate sizes are available.

when opening konsole using a size that is not 9,12,15,18,21 or 24 empty background is shown for ~4s before showing the application and text is bad formatted for example top columns get messy and output is unreadable
Also I have noticed that intermediate sizes in the slider are bigger than sizes presented in "Edit font"
for example size 14 is bigger than 15.
Changing to another font solves the issue.

It can be reproduced by changing to terminus font and selecting some intermediate value.
Comment 1 damian pereira 2010-01-07 06:25:32 UTC
Created attachment 39636 [details]
screenshot of top with a font size of 11
Comment 2 Christoph Feck 2010-01-08 01:17:43 UTC
Which distribution ships a variable-width font as default monospaced? Use a different font.
Comment 3 Matthew Woehlke 2010-01-08 03:02:23 UTC
I don't think this should be closed so brusquely. Damian reported using Terminus, a fixed-width (bitmap) font (which is probably not being mapped from "Monospace"; rather I would surmise Konsole was patched to ask for "Terminus" by default). As I read the description, Konsole is falling back to a variable-width font when it tries to use a size of Terminus that doesn't exist. (However, I can't reproduce that on my system; I'm getting the nearest match.)

I'm not sure how you got from that that the distro is mapping a variable-width font to "Monospace". But even if you know something I don't, that's clearly an UPSTREAM problem, not INVALID (which is to say, if the problem really is the distro mapping something not-fixed-width to "Monospace", that's clearly a bug).
Comment 4 Robert Knight 2010-01-08 11:06:47 UTC
> But even if you know something I don't, that's clearly an
> UPSTREAM problem, not INVALID

Distros are downstream.
Comment 5 Matthew Woehlke 2010-01-08 18:44:50 UTC
> Distros are downstream.

Er... right :-). It would be UPSTREAM (I guess?) if Qt/fontconfig is doing something silly.

Damian, what exactly are you running? You talk about a "default font" Terminus but put 'compiled from source' as your KDE flavor. But I am pretty sure Terminus is not the default font in pristine. Since this doesn't seem to be a generic (i.e. "occurs for everyone") problem, it would help to know where your KDE, Qt, fontconfig, etc. is coming from.
Comment 6 damian pereira 2010-01-11 05:50:03 UTC
Hi, sorry if it was my distribution default I thinked It was konsole default
I'm using arch with kdemod http://chakra-project.org/
I choose unlisted binary when I filled the bug I don't know why it says that.
I think terminus font is intended to be used at those and only those sizes so shouldn't konsole skip wrong sizes?
Comment 7 urcindalo 2010-03-16 10:04:11 UTC
I asked the question below in the Gentoo forums, but now I see this a better place in my humble opinion :)

===
I recently changed my 17" CRT monitor to an "old and square" 19" LCD.

At 96 dpi terminus-font-4.30 looks as glorious as ever in my new monitor. But the *real* dpi of my 1280x1024 resolution are 86, so I'm setting 86 dpi through a bash script in my ~/.kde4/env/ folder:

---
$ cat ~/.kde4/env/dpi.sh
#!/bin/bash
xrandr --dpi 86
---

since for some reason the nouveau driver for my old Nvidia GeForce 5200 FX card, or xorg-server, or whichever, insists of seeing my screen dimensions smaller than they actually are, incorrectly setting the dpi to 96.

The thing is when I start up KDE with an 86 dpi setting, all fonts look OK except terminus-font from portage. I use it as my Konsole default font. It just looks horribly and even misplaces characters in the screen, almost overlapping some of them.

As a workaround I've downloaded the current TTF versions of the terminus font from a webpage, so un-emerging terminus-font and installing these TTF variants by hand solves the problem for me. But I'm just curious as to why terminus-font renders so badly at 86 dpi.
Other mono fonts look OK.
Comment 8 Jekyll Wu 2011-08-07 03:31:47 UTC
Can't reproduce it with KDE-4.7.0

Feel free to reopen if this still happens in recent version.