Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Disabling font anti-aliasing in kde4
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jkv
n00b
n00b


Joined: 25 Jul 2009
Posts: 2
Location: Finland

PostPosted: Sat Jul 25, 2009 3:06 pm    Post subject: Disabling font anti-aliasing in kde4 Reply with quote

Hi,
I have recently switched my system from kde 3.5.10 to 4.2.4 (portage tree, ~amd64) and while trying to adapt to it am having problems with font settings, more specifically with anti-aliasing of ui elements. All kde (or qt) rendered text is now always anti-aliased, contrary to what I had in 3.5.10. I have my system setup based on info on sites like http://www.sharpfonts.com/.

/etc/fonts/local.conf
Code:

--SNIP

<!--
#####################################################
   Bitstream vera

   Best looks with native hinting + antialias
   For smaller sizes maybe worth enabling rgb
#####################################################
-->
<match target="font">
   <test name="family">
      <string>bitstream vera sans</string>
      <string>bitstream vera serif</string>
      <string>bitstream vera sans mono</string>
   </test>
   <edit name="antialias" mode="assign"> <bool>true</bool> </edit>
   <edit name="autohint" mode="assign"> <bool>false</bool> </edit>
   <edit name="rgba" mode="assign"> <const>none</const> </edit>
</match>

--SNIP

<!--
#################
    Corefonts
#################
-->

<!-- Common for all corefonts -->
<match target="font">
    <test qual="any" name="family">
        <string>arial</string>
        <string>arial black</string>
        <string>comic sans ms</string>
        <string>georgia</string>
        <string>impact</string>
        <string>times new roman</string>
        <string>trebuchet ms</string>
        <string>verdana</string>
        <string>webdings</string>
        <string>tahoma</string>

        <string>andale mono</string>
        <string>courier new</string>
        <string>lucida console</string>
    </test>

    <edit name="antialias" mode="assign"> <bool>true</bool> </edit>
    <edit name="autohint" mode="assign"> <bool>false</bool> </edit>
    <edit name="rgba" mode="assign"> <const>none</const> </edit>
</match>

--SNIP

<!--
    tahoma
-->
<match target="font">
    <test name="family" qual="any">                     <string>tahoma</string> </test>
    <test name="size" compare="less" qual="any"> <double>6.5</double>    </test>

    <edit name="autohint" mode="assign"> <bool>true</bool> </edit>
</match>

<match target="font">
    <test name="family" qual="any">                         <string>tahoma</string> </test>
    <test name="size" compare="less" qual="any">    <double>10.5</double>   </test>
    <test name="size" compare="more" qual="any">  <double>6.5</double>    </test>

    <edit name="antialias" mode="assign"> <bool>false</bool> </edit>
</match>

--SNIP

eselect fontconfig list
Code:
Available fontconfig .conf files  ( * is enabled ):
  [1]   10-autohint.conf *
  [2]   10-no-sub-pixel.conf
  [3]   10-sub-pixel-bgr.conf
  [4]   10-sub-pixel-rgb.conf
  [5]   10-sub-pixel-vbgr.conf
  [6]   10-sub-pixel-vrgb.conf
  [7]   10-unhinted.conf
  [8]   20-fix-globaladvance.conf
  [9]   20-unhint-small-dejavu-sans.conf
  [10]  20-unhint-small-dejavu-sans-mono.conf
  [11]  20-unhint-small-dejavu-serif.conf
  [12]  20-unhint-small-vera.conf
  [13]  25-unhint-nonlatin.conf
  [14]  30-metric-aliases.conf *
  [15]  30-urw-aliases.conf *
  [16]  40-nonlatin.conf *
  [17]  45-latin.conf *
  [18]  49-sansserif.conf *
  [19]  50-user.conf *
  [20]  51-local.conf *
  [21]  57-dejavu-sans.conf *
  [22]  57-dejavu-sans-mono.conf *
  [23]  57-dejavu-serif.conf *
  [24]  60-latin.conf *
  [25]  65-fonts-persian.conf
  [26]  65-khmer.conf
  [27]  65-nonlatin.conf *
  [28]  69-unifont.conf *
  [29]  70-no-bitmaps.conf
  [30]  70-yes-bitmaps.conf
  [31]  80-delicious.conf *
  [32]  90-synthetic.conf *

I included only relevant parts, but i suspect my problems have nothing to do with fontconfig setttings as such.

I have native bytecode interpreter enabled for freetype, but by default autohint is enabled as shown above. Autohinting is disabled for corefonts and bitstream-vera/dejavu as suggested in many web sites to get sharp fonts (like in win XP) and because latter fonts are supposed to look better that way. Only fontconfig stuff in $HOME is what kde gui font setting dialog write in ~/.fonts.conf.

KDE 3.5 responded almost perfectly to these settings but KDE 4 doesn't. It seems to ignore them for most part.

Changing system settings in Appearance/Fonts has no effect (except on non-kde/non-qt-4.5 apps like firefox or gimp). This makes me believe it's got more to do with switch from qt3 to qt4.5. The fact that by chance happening to run old kedit 3.5.10 (which uses qt3) within kde4 it had sharp fonts enforces this belief.

Reading the web gives me impression the settings should still work, so maybe there is some crucial use flag I don't know about that's incorrectly set and affecs font rendering. Or maybe there is some leftovers from kde3.5 that have some effect. I don't know.

So my question is how could I make KDE4/QT-4.5 respect my fontconfig settings again, or failing that to disable anti-alias some other way ?
Back to top
View user's profile Send private message
jkv
n00b
n00b


Joined: 25 Jul 2009
Posts: 2
Location: Finland

PostPosted: Sun Jul 26, 2009 11:16 am    Post subject: Reply with quote

Seems I was wrong about fontconfig settings being correct: changing all

    <test name="size" compare="..."> </test>

elements to

    <test name="pixelsize" compare="..." > </test>

in /etc/fonts/local.conf and modifying the test values seems to have solven the problem.

I wonder now if using pixelsize for testing font sizes was the correct way to do it anyway ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum