Bug 116087 - Garbage stays on screen with antialiasing enabled
Summary: Garbage stays on screen with antialiasing enabled
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.5.2
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-10 20:01 UTC by Ricardo Garcia
Modified: 2011-07-30 22:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Typed one underscore (10.73 KB, image/png)
2005-11-10 20:02 UTC, Ricardo Garcia
Details
Typed several more underscores (10.75 KB, image/png)
2005-11-10 20:03 UTC, Ricardo Garcia
Details
Removed the underscores with backspace. Notice garbage on screen. (10.74 KB, image/png)
2005-11-10 20:03 UTC, Ricardo Garcia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Garcia 2005-11-10 20:01:02 UTC
Version:           1.5.2 (using KDE KDE 3.4.2)
Installed from:    Slackware Packages
OS:                Linux

I have antialiasing enabled, but hinting disabled. With a 75dpi X server and the font "Bitstream Vera Sans Mono" in size 16, underscore characters showed in konsole leave garbage after you delete or overwrite them. An easy way of testing this is, whith the above antialiasing settings, type several underscores in the prompt, then delete them. You'll see some small grey lines remaining.

The bug does not happen when you change the antialiasing type to include hinting. The bug does not happen in other KDE applications that I know of. For example, I use the same monospace font in kedit, and it does not have that problem. I have tried using a smaller font, changing the size from 16 to 14, and the problem disappears too. It is just that that font, size and antialiasing settings are the ones I prefer, and I hit the bug with them :(.

I will provide some screenshots to show the problem. I have also noticed that when you type only an underscore alone, the line is lighter. The line is darker if you type another underscore to the right (why?).
Comment 1 Ricardo Garcia 2005-11-10 20:02:00 UTC
Created attachment 13380 [details]
Typed one underscore
Comment 2 Ricardo Garcia 2005-11-10 20:03:04 UTC
Created attachment 13381 [details]
Typed several more underscores
Comment 3 Ricardo Garcia 2005-11-10 20:03:53 UTC
Created attachment 13382 [details]
Removed the underscores with backspace. Notice garbage on screen.
Comment 4 Ricardo Garcia 2005-11-10 20:06:08 UTC
I forgot to mention that the garbage disappears if you hide the konsole display by minimizing it or putting another window on top of it and then showing it again.
Comment 5 Vassilii Khachaturov 2007-04-18 17:45:49 UTC
I still have it in debian kde konsole from 3.5.5:
$ dpkg --status konsole
Package: konsole
Status: install ok installed
...
Architecture: i386
Source: kdebase
Version: 4:3.5.5a.dfsg.1-6

It feels that the application gets the bounding box info from the font chars, but in reality the symbol gets rendered into larger box, when the antialiasing is taken into account. In "Monospace/bold/18" font, do an "echo M" to have an "M" printed near the left border. Then do a "clear" and you'll see the left portion of "M"'s antialiasing (lighter gray than the letter) still on the screen. I can post screenshots if it's unclear.
Comment 6 Vassilii Khachaturov 2007-04-18 20:49:08 UTC
P.S. My version of konsole is 1.6.5
Comment 7 Robert Knight 2007-04-20 14:31:25 UTC
I am not able to reproduce here, but looking at the relevant code your diagnosis is probably correct.  

The box cleared for the character is based on the width and height metrics in pixels returned by Qt.  It is possible that under some circumstances with antialiasing the character extends beyond this area.
Comment 8 Vassilii Khachaturov 2007-04-20 18:15:51 UTC
If you wish, I can give you as much local settings for reproduction as
you need so that it's retestable locally. 

Here are the relevant debconf settings:
*** The following debconf settings were detected:
* fontconfig/subpixel_rendering: Never
* fontconfig/enable_bitmaps: false
* fontconfig/hinting_type: Native

Font that I gave in my original mail hits it, also most other fonts
with wide enough capital M which are bold have the same effect.

Here is my fonts configuration set (from /etc/fonts/conf.d) 

	lrwxrwxrwx 1 root root 42 2007-04-16 19:25 10-no-sub-pixel.conf -> /etc/fonts/conf.avail/10-no-sub-pixel.conf
	lrwxrwxrwx 1 root root 39 2007-03-07 20:28 20-fix-globaladvance.conf -> ../conf.avail/20-fix-globaladvance.conf
	lrwxrwxrwx 1 root root 36 2007-03-07 20:28 20-lohit-gujarati.conf -> ../conf.avail/20-lohit-gujarati.conf
	lrwxrwxrwx 1 root root 39 2007-03-07 20:28 20-unhint-small-vera.conf -> ../conf.avail/20-unhint-small-vera.conf
	lrwxrwxrwx 1 root root 33 2007-03-07 20:28 30-amt-aliases.conf -> ../conf.avail/30-amt-aliases.conf
	lrwxrwxrwx 1 root root 39 2007-04-16 19:25 30-defoma.conf -> /var/lib/defoma/fontconfig.d/fonts.conf
	lrwxrwxrwx 1 root root 33 2007-03-07 20:28 30-urw-aliases.conf -> ../conf.avail/30-urw-aliases.conf
	lrwxrwxrwx 1 root root 29 2007-03-07 20:28 40-generic.conf -> ../conf.avail/40-generic.conf
	lrwxrwxrwx 1 root root 31 2007-03-07 20:28 49-sansserif.conf -> ../conf.avail/49-sansserif.conf
	lrwxrwxrwx 1 root root 26 2007-03-07 20:28 50-user.conf -> ../conf.avail/50-user.conf
	lrwxrwxrwx 1 root root 27 2007-03-07 20:28 51-local.conf -> ../conf.avail/51-local.conf
	lrwxrwxrwx 1 root root 27 2007-03-07 20:28 60-latin.conf -> ../conf.avail/60-latin.conf
	lrwxrwxrwx 1 root root 35 2007-03-07 20:28 65-fonts-persian.conf -> ../conf.avail/65-fonts-persian.conf
	lrwxrwxrwx 1 root root 30 2007-03-07 20:28 65-nonlatin.conf -> ../conf.avail/65-nonlatin.conf
	lrwxrwxrwx 1 root root 29 2007-03-07 20:28 69-unifont.conf -> ../conf.avail/69-unifont.conf
	lrwxrwxrwx 1 root root 40 2007-04-16 19:25 70-no-bitmaps.conf -> /etc/fonts/conf.avail/70-no-bitmaps.conf
	lrwxrwxrwx 1 root root 31 2007-03-07 20:28 80-delicious.conf -> ../conf.avail/80-delicious.conf
	lrwxrwxrwx 1 root root 31 2007-03-07 20:28 90-synthetic.conf -> ../conf.avail/90-synthetic.conf

If you need the contents of those not here, 
I can paste them together,
but these are Debian std; the defoma one only sets up some particular
aliases:
	<fontconfig>
	   <dir>/var/lib/defoma/fontconfig.d</dir>
	   <alias>
		  <family>Palatino-Roman</family>
		  <accept><family>URWPalladioL-Roma</family></accept>
	   </alias>
	...

Feel free to ask for more details if needed.

Vassilii
Comment 9 Robert Knight 2008-01-12 21:26:56 UTC
Should be fixed in KDE 4 since Konsole now always repaints full lines rather than individual letters when typing on a line.  I couldn't reproduce in KDE 3 though so I'll need someone else to confirm.
Comment 10 Vassilii Khachaturov 2011-02-01 18:37:39 UTC
Verified fixed on KDE 4.4.5.
Thanks, folks!