You are not logged in.

#1 2010-10-13 14:26:37

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 653

GTK fonts on KDE. Fonts not antialiased [SOLVED]

How can I configure antialasing on gtk apps inside a KDE session? The only working mode i know is installing gnome and execute "gnome-settings-appareance" and then change antialasing settings, but I don't want install gnome, is there another method? I want Comic Sans 11 with hintslight on all my apps.

iolwuq.png

my .fonts.conf

<?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>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

.gtkrc-2.0

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/kde44-oxygen-molecule-flat/gtk-2.0/gtkrc"
# Configuration for Gtk

style "user-font"
{
    font_name = "Comic Sans 11"
}
widget_class "*" style "user-font"
gtk-font-name = "Comic Sans 11"

gtk-icon-theme-name = "kde44-oxygen-molecule"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size = GTK_ICON_SIZE_SMALL_TOOLBAR

style "user-font" {
    font_name = "Comic Sans MS 11"
}

widget_class "*" style "user-font"

gtk-font-name="Comic Sans MS 11"

include "/home/agapito/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT

.gtkrc.mine

# Configuration for Gtk

style "user-font"
{
    font_name = "Comic Sans 11"
}
widget_class "*" style "user-font"
gtk-font-name = "Comic Sans 11"

gtk-icon-theme-name = "kde44-oxygen-molecule"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size = GTK_ICON_SIZE_SMALL_TOOLBAR

gtk-xft-antialias = 1
gtk-xft-hinting = 1
gtk-xft-hintstyle = "hintslight"
gtk-xft-rgba = "rgb"

Moderator edit: if your issue is completlely solved, you can use a [Solved] tag, until then just keep your title clean, 'partially solved' or 'reopened' doesn't help people.

Last edited by agapito (2010-10-14 00:15:20)


Excuse my poor English.

Offline

#2 2010-10-13 14:46:37

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 653

Re: GTK fonts on KDE. Fonts not antialiased [SOLVED]

Lol ... I solved easily. I deleted .fonts.conf and gtkrc.mine and i created .Xdefaults with this settings


! Xft settings ---------------------------------------------------------------

Xft.dpi:        96
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintslight

But now I have a problem. I copied .Xdefaults to /root and /home/root and programs (qt and gtk) opened like root have aliased fonts :S

Last edited by agapito (2010-10-13 15:04:09)


Excuse my poor English.

Offline

#3 2010-10-13 21:45:42

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: GTK fonts on KDE. Fonts not antialiased [SOLVED]

try /etc/fonts/local.conf instead of ~/.fonts.conf

also, you probably want the (new) lcdfilter option enabled if you use subpixel rendering (there's info about it on the font configuration page in the archwiki)

Offline

#4 2010-10-14 00:14:04

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 653

Re: GTK fonts on KDE. Fonts not antialiased [SOLVED]

thestinger wrote:

try /etc/fonts/local.conf instead of ~/.fonts.conf

also, you probably want the (new) lcdfilter option enabled if you use subpixel rendering (there's info about it on the font configuration page in the archwiki)

Thanks! With local.conf i don't need .Xdefaults and ~/.fonts.conf. I deleted both files and all my fonts looks nice.

Here is my  /etc/fonts/local.conf

<?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>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>

I've added lcddefault like you suggested and now my kdm fonts are antialiased also!

Last edited by agapito (2010-10-14 00:21:55)


Excuse my poor English.

Offline

#5 2010-10-14 00:32:00

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: GTK fonts on KDE. Fonts not antialiased [SOLVED]

Shouldn't the last <match> ... </match> portion be inside the scope of the <fontconfig> ... </fontconfig> tags and not outside of them?

Last edited by frabjous (2010-10-14 00:32:14)

Offline

Board footer

Powered by FluxBB