|
3 Simple Steps to Font Perfection in Linux |
|
Sunday, 16 September 2007 |
2008-07-08: local.conf syntax fixed.
This one doesn't just apply to KDE, it applies to every Linux window manager out there. I suggest that before going through this guide, you go through either the KDE or Gnome guide for sharp fonts first, to get your DPI settings correctly set, and get font settings to be the same for your GTK apps, too.
(After...click to enlarge in new window/tab)
Once you have done that, these 3 simple tweaks will simply amaze you by the clarity and beauty of the fonts on your Linux box. You will need to have the Microsoft fonts installed for any of these tweaks to work. I found these while Googling, and can't remember the addresses. Credit goes to the original writers of this code, though. It's time I stop rambling on, and get on to the good stuff...here goes!
Tweak 1: /etc/fonts/local.conf – Get Rid of Ugly Fonts Wherever your font config information is (usually /etc/fonts/local.conf), you need to edit or create the local.conf file, and paste this inside and save:
<fontconfig> <match target="pattern"> <test qual="any" name="family"> <string>Bitstream Vera Sans</string> </test> <edit name="family" mode="assign"> <string>Verdana</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Helevetica</string> </test> <edit name="family" mode="assign"> <string>Arial</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Palatino</string> </test> <edit name="family" mode="assign"> <string>Georgia</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Times</string> </test> <edit name="family" mode="assign"> <string>Times New Roman</string> </edit> </match> </fontconfig>
What this does is replace the ugly default system fonts with the nice proprietary Microsoft fonts, which are much clearer, and look better anti aliased. Make sure you have them installed. You can do this to replace any fonts you don't like.
Tweak 2: userChrome.css – Make Firefox's toolbars and menus use nice fontsThis tweak makes Firefox use Tahoma for its toolbars and menus. Feel free to change it to whatever font you prefer. Usually, this goes in /home/yourname/.mozilla/profiles/yourprofile/Chrome/userChrome.css – create it if it doesn't exist in the Chrome folder.
{ font-size: 10pt !important; font-family: Tahoma !important; }
Tweak 3: userContent.css – Make website buttons look goodDespite these tweaks, you can sometimes end up making the buttons on various websites too big or too small. This fix takes care of that in /home/yourname/.mozilla/profiles/yourprofile/Chrome/userContent.css – create it if it doesn't exist in the Chrome folder.
input, textarea, select, button, input[type="button"], input[type="reset"], input[type="submit"] { font-size: 8pt !important; font-family: Verdana !important; }
That's it! Wasn't that easy? Now, restart your xserver, and see how everything looks! Isn't it beautiful?
|