Bug 114658 - Konsole --noxft switch doesn't work
Summary: Konsole --noxft switch doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmfonts (show other bugs)
Version: 3.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: rik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-19 06:31 UTC by Artem S. Tashkinov
Modified: 2009-01-12 01:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Konsole snapshot (17.83 KB, image/png)
2005-10-19 06:34 UTC, Artem S. Tashkinov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artem S. Tashkinov 2005-10-19 06:31:48 UTC
Version:           1.6 (using KDE 3.4.92 (beta2, >= 20051010), compiled sources)
Compiler:          GCC 4.0.2 compilation flags used: -O2 -march=pentium2
OS:                Linux (i686) release 2.6.13-k8

In KDE 3.5 beta 2 konsole will always run with antialiased fonts regardless --noxft switch
Comment 1 Artem S. Tashkinov 2005-10-19 06:34:22 UTC
Created attachment 13052 [details]
Konsole snapshot

In this snapshot you can see that konsole is being run with --noxft switch but
fonts are antialiased.
Comment 2 Artem S. Tashkinov 2005-10-19 06:36:11 UTC
I have also KDE 3.4.2 installed from sources and this switch works OK.
Comment 3 Artem S. Tashkinov 2005-10-19 12:45:29 UTC
I did an investigation and found out that this problem is possibly a QT/Xft/X.org problem.

Everyhting works right if my .fonts.conf file like like this (1):
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
</fontconfig>

But when this file looks like this Konsole fonts are always antialiased (2):
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

To sort everything out I created a new user and logged under it to KDE. Then I run KControl and enabled antialiasing settings, that made KDE produce the file (1). When I relogon'ed and started KControl settings I disabled and reenabled antialiasing setting. Strangely this time KDE produced the file (2). And with the second file Konsole doesn't work properly ...
Comment 4 Kurt Hindenburg 2005-10-24 20:12:30 UTC
Here's the code Konsole uses for this:

void TEWidget::setVTFont(const QFont& f)
{
  QFont font = f;
  if (!s_antialias)
    font.setStyleStrategy( QFont::NoAntialias );
  QFrame::setFont(font);
  fontChange(font);
}

I would say this is a Qt/KDE/X issue.  Konsole can't really do anything about it.
Comment 5 Artem S. Tashkinov 2005-10-28 15:46:56 UTC
Should we reassign the bug to someone else?
Comment 6 Artem S. Tashkinov 2006-03-14 06:53:18 UTC
This bug persists in KDE 3.5.1/QT 3.3.5/X.org 6.8.2/Xft 2.8.1/fontconfig 2.2.3 as well.
Comment 7 Γιώργος Κυλάφας (Giorgos Kylafas) 2006-03-14 08:15:48 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Artem S. Tashkinov 2006-03-20 15:31:46 UTC
This is the information I've just received from trolltech developer:

--------------------------------------------------------------------
I can reproduce the behavior you are experiencing using the file you
sent, but it is not actually a bug in Qt.

Calling QFont::setStyleStrategy() is just a hint to the font match
system about which fonts should be used, but if there is actually a
rule in the .fonts.conf file such as:

 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>

Then Qt can not do anything about it because you are explicitly forcing
all fonts to be anti-aliased. To change this behavior, either remove
the above option from your .fonts.conf or put a size restriction on it
so that it only happens at certain sizes.

Regards,

--
Jason Barron, Support Engineer
Trolltech AS, Oslo - http://www.trolltech.com

--------------------------------------------------------------------

So indeed, it's KDE KCM Fonts module bug - it should not ever add this portion

 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>

to the $HOME/.fonts.conf file.
Comment 9 Robert Knight 2007-07-19 19:59:35 UTC
Confirmed that removing the specified section from .fonts.conf fixes the problem.

Re-assigning to KControl / kcmfonts
Comment 10 Artem S. Tashkinov 2009-01-12 01:14:16 UTC
This bug seems to be resolved in KDE 4.x