[Fontconfig] Default font size

Felix Miata mrmazda at earthlink.net
Wed Aug 24 18:03:42 PDT 2011


On 2011/08/25 01:18 (GMT+0200) Raimund Steger composed:

> Your best bet might be a GTK/Qt theme integration package. AFAIK most
> KDE-based distributions used to have such a thing, but I admit I have
> little experience with KDE. If you already use one and it doesn't work,
> well, then I guess some trussing and file-editing is in order :) or
> asking somewhere where the KDE gurus lurk..

I have no material experience using Gnome, much less using KDE apps in Gnome. 
What I do know is that font sizes in QT & KDE apps are affected by the 
following 4 user config files, with the font content (most set to 10pt) of 
each of mine as a guide to manual configuration:

~/.config/Trolltech.conf:
...
[Qt]
font="Droid Sans,10,-1,5,50,0,0,0,0,0"
...

~/.kde4/shar/config/kdeglobals:
[General]
desktopFont=Droid Sans,10,-1,5,50,0,0,0,0,0
fixed=Droid Sans Mono,10,-1,5,50,0,0,0,0,0
font=Droid Sans,10,-1,5,50,0,0,0,0,0
menuFont=Droid Sans,10,-1,5,50,0,0,0,0,0
smallestReadableFont=Droid Sans,9,-1,5,50,0,0,0,0,0
taskbarFont=Droid Sans,9,-1,5,50,0,0,0,0,0
toolBarFont=Droid Sans,10,-1,5,50,0,0,0,0,0


~/.fonts.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font" >
   <edit name="autohint" >
    <bool>true</bool>
   </edit>
  </match>
  <match target="font" >
   <edit mode="assign" name="rgba" >
    <const>none</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>hintmedium</const>
   </edit>
  </match>
  <match target="font" >
   <edit mode="assign" name="antialias" >
    <bool>true</bool>
   </edit>
  </match>
</fontconfig>

~/.kderc:
[General]
activeFont=Droid Sans,10,-1,5,75,0,0,0,0,0
desktopFont=Droid Sans,10,-1,5,50,0,0,0,0,0
fixed=Droid Sans Mono,10,-1,5,50,0,0,0,0,0
font=Droid Sans,10,-1,5,50,0,0,0,0,0
menuFont=Droid Sans,10,-1,5,50,0,0,0,0,0
smallestReadableFont=Droid Sans,9,-1,5,50,0,0,0,0,0
taskbarFont=Droid Sans,9,-1,5,50,0,0,0,0,0
toolBarFont=Droid Sans,10,-1,5,50,0,0,0,0,0

Why KDE4 duplicates the same font specs in two different config files I don't 
know. Possibly ~/.kderc is a legacy from KDE3 that KDE3 apps run under KDE4 
depend on, and KDE4 sets it only for that compatibility reason.

The utility kcm_gtk is used to make Gnome apps run under KDE4 use the same 
fonts as KDE4. Under KDE4 fonts are configured using the systemsettings utility.
-- 
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/


More information about the Fontconfig mailing list