LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 02-16-2005, 02:16 PM   #1
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

Rep: Reputation: 30
ugly fonts - help


Hi,

I've installed slack 10.1 with KDE 3.3. I'm totaly newbie as far as X concerned. I've also installed the newest Firefox. The first thing I've found is that the fonts look just UGLY! I've read some articles about importing windows fonts (i've got winxp partion mounted). I used built in functionality from KDE control center to import my winfonts, however they look the same ugly as linux fonts !!! Only the font "Helvetica" looks well - but anyway, event if I set all fonts to Helvetica some of them remain still the same (the fonts in Kadu communicator or AMSN messenger). And of course damn firefox is using some bad looking font in address bar. It doesn't also show verdana where it should. I experimented with fonts settings in firefox but without success.
So, did anybody manage to setup KDE + firefox + other applications to look at least 90% of what windows fonts look like? If yes could you provide some steps how to do it? I was using olny text mode unitl this day, so ... be patient with me please

Chris

Last edited by krizzz; 02-16-2005 at 02:18 PM.
 
Old 02-16-2005, 02:45 PM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Rep: Reputation: 137Reputation: 137
Did you check the anti-aliasing box in KDE CONTROL PANEL/Appearance/fonts
 
Old 02-16-2005, 02:58 PM   #3
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
After much trial and error, I've never gotten fonts to look exactly right in X. Anti-aliasing makes them too blurry and not having it on makes them too jagged looking.
 
Old 02-16-2005, 03:01 PM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
By my tastes, my KDE+Firefox+other applications fonts look 400% of what Windows fonts look like. I run 2048x1536 and use the high DPI to acheive superb sharp detail that you just can't do in Windows (it's harder to configure everything in Windows to work well with larger fonts).

But anyway, KDE's control center will only control fonts for KDE apps. IMHO, this alone is a good excuse to use more KDE apps than GNOME apps. However, some GtK apps are simply too good to pass up, like Mozilla Firefox and The GIMP.

In order to configure the fonts on those GtK apps within KDE, you'll need to set up a GtK config file in your home directory. Here's a great little guide on how to do it:

font configuration guide

Skim down to the third post, where he finally gets around to the config file for GtK-2 apps. By now, most every GtK app you'll be using uses GtK-2 (like Mozilla Firefox). So, you just create the file ~/.gtkrc-2.0 and put something like this:

Code:
gtk-font-name="Helvetica 12"
 
Old 02-16-2005, 03:53 PM   #5
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

Original Poster
Rep: Reputation: 30
Thank you for your advice everybody. Especially IsaacKuo's post regarding Gtk apps. I've found it very usefull! I've also found that the another problem with my settings might be screen dpi settings. I'm using LCD monitor with it's native resolution of 1280x1024. I heard that in the case of well working display and good resolution there's no need to use antialiasing, honestly I don't really like kind of a blur fonts it produces. Can you tell me then how to set dpi?
 
Old 02-16-2005, 04:07 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
I'm not sure about the dpi thing, but I do know that you really really really really want to use "sub-pixel rendering". This is a technique which only works on LCD displays, and takes advantage of the fact that each pixel in most LCD displays is actually made up of 3 rectangular sub-pixels (red, green and blue side-by-side).

This means that a sophisticated font renderer can acheive a 3x boost in horizontal resolution for fonts. This looks very, very, good. Unlike anti-aliasing which is blurry, sub-pixel rendering is super-sharp.

I know there's a simple switch for setting subpixel-rendering in the GNOME control center. I'm not familiar with where to find the option in KDE. Do a Google search on sub-pixel rendering and linux. Once you figure out how to get sub-pixel rendering working, you'll never go back!
 
Old 02-16-2005, 04:19 PM   #7
Tuvok
Member
 
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170

Rep: Reputation: 30
This is my recent screenshot. This thread helped me.

Last edited by Tuvok; 02-19-2005 at 08:31 AM.
 
Old 02-16-2005, 04:23 PM   #8
coffeedrinker
Member
 
Registered: Sep 2003
Posts: 173

Rep: Reputation: 30
Setting Up Fonts in Slackware Linux

1. Install Slackware

2. Copy any extra TrueType fonts to /usr/X11R6/lib/X11/fonts/TTF

3. Install latest version of Freetype
Code:
	a. decompress the archive
	b. Open the file "include/freetype/config/ftoption.h"
		locate a line that says:
			#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
		change it to:
			#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
	c. configure, make, make install (I use an old slacware build script for freetype)
4. Update font metrics
It is important to do this AFTER you have a fixed Freetype installed. I run this from a script, as root. Re-run it every time you add fonts to your system.

Code:
#! /bin/sh

/usr/X11R6/bin/mkfontscale /usr/X11R6/lib/X11/fonts/TTF/
/usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/TTF/
/usr/X11R6/bin/mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings
/usr/X11/bin/fc-cache
5. Turn on anti-aliasing but limit the range. I think it works best to have it turned off for small fonts, except italics.
Here is my copy of ~/.fonts.conf

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <test compare="more" name="size" qual="any" >
   <double>6</double>
  </test>
  <test compare="less" name="size" qual="any" >
   <double>14</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
 <match target="font" >
  <test compare="more" name="pixelsize" qual="any" >
   <double>6</double>
  </test>
  <test compare="less" name="pixelsize" qual="any" >
   <double>15</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
 <match target="font" >
  <test compare="eq" name="slant" >
   <const>italic</const>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
</fontconfig>
6. Fix for gtk apps
add to ~/.gtkrc and to ~/.gtkrc-2.0

gtk-font-name = "Tahoma 12"
gtk-xft-antialias = 1
 
Old 02-16-2005, 05:29 PM   #9
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
Quote:
Code:
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
I've found that to cause a lot of trouble with the Bitstream fonts. With the bytecode interpreted fonts, such as Arial, it doesn't make a difference. It's safer to leave it out, or set it to 'none' - X already knows the sub pixel order.

To enable sub pixel hinting (which you should always do for LCDs) as IsaacKuo says, you need to add the following to your ~/.fonts.conf:
Code:
 <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>
My experience is that if you are using the Bitstream fonts, they look better using the autohinter + antialiasing (for all sizes). If you use the M$ fonts and want the super crisp look (though much improved over) Windows look, you need to follow coffeedrinker's instructions to enable the bytecode interpreter and then install the M$ fonts.

When you compile FreeType, make sure you pass --prefix=/usr to ./configure (e.g. ./configure --prefix=/usr) to make sure that FreeType overwrites the old FreeType libraries, otherwise some applications get themselves in a muddle.

You can also redefine the default fonts in ~/.fonts.conf (you may still need to edit .gtkrc though) - especially useful if you want to redefine the default sans-serif, serif and monospace fonts.

e.g.
Code:
<!-- Make the default sans-serif font Arial -->
<match target="pattern" name="family" >
  <test name="family" qual="any" >
   <string>sans-serif</string>
  </test>
  <edit mode="assign" name="family" >
   <string>Arial</string>
  </edit>
 </match>

Last edited by cathectic; 02-16-2005 at 05:38 PM.
 
Old 02-16-2005, 05:37 PM   #10
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well...to get better looking fonts you can set a higher dpi-value.

if you use startx, edit the script " /usr/X11R6/bin/startx " and make line 24 look lik this :

-----------
defaultserverargs="-dpi 96"
-----------

by default X startsup with 81 dpi ( here )

------------
$grep DPI /var/log/Xorg.0.log

returns

(--) RADEON(0): DPI set to (81, 81)
-------------

96 dpi looks better.

egag
 
Old 02-16-2005, 06:28 PM   #11
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

Original Poster
Rep: Reputation: 30
It worked! Thank you guys! I'm writing this posting using beautiful, clear M$-like fonts! I really appreciate your help!!!, Now I know what this is all about.

Last edited by krizzz; 02-16-2005 at 06:30 PM.
 
Old 02-16-2005, 07:31 PM   #12
bad_andy
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1/Slackware 10.0
Posts: 154

Rep: Reputation: 30
What worked?
 
Old 02-17-2005, 10:32 PM   #13
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

Original Poster
Rep: Reputation: 30
Quote:
What worked?
So, just a brief note about how to use the information from this thread to get the good fonts in Slack.

1. Set your dpi to 96x96 (posted by tuvok and egag)
2. Compile newest FreeType with TT_CONFIG_OPTION_BYTECODE_INTERPRETER (posted by coffeedrinker)
3. Install MS TrueType fonts (posted by coffeedrinker)
3. Set up fonts.conf (posted by coffeedrinker/cathetic)
4. Add settings to ~/.gtkrc and ~/.gtkrc-2.0 (posted by coffeedrinker)
5. If you have LCD Display - set the proper subpixel hinting options (posted by cathetic)

All you need is to read CAREFULLY what has been written in above posts and follow the instructions.

Last edited by krizzz; 02-17-2005 at 10:36 PM.
 
Old 02-18-2005, 08:37 AM   #14
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
If you want to make your changes system wide, you can also copy your ~/.fonts.conf to /etc/fonts/local.conf (don't worry if it doesn't exist, Slackware just doesn't create it by default).
 
Old 02-18-2005, 11:03 AM   #15
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
Quote:
Originally posted by krizzz
So, just a brief note about how to use the information from this thread to get the good fonts in Slack.

1. Set your dpi to 96x96 (posted by tuvok and egag)
2. Compile newest FreeType with TT_CONFIG_OPTION_BYTECODE_INTERPRETER (posted by coffeedrinker)
3. Install MS TrueType fonts (posted by coffeedrinker)
3. Set up fonts.conf (posted by coffeedrinker/cathetic)
4. Add settings to ~/.gtkrc and ~/.gtkrc-2.0 (posted by coffeedrinker)
5. If you have LCD Display - set the proper subpixel hinting options (posted by cathetic)

All you need is to read CAREFULLY what has been written in above posts and follow the instructions.
congrats and thanks for posting your solution

great thread

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ugly Fonts?! CaseMillennium Mandriva 1 03-25-2005 10:52 AM
Ugly fonts? MATJA_KAE_92 Mandriva 12 10-08-2004 06:08 PM
Fonts really ugly saiz66 Slackware 3 06-19-2004 10:25 PM
Open Office fonts look ugly (and print ugly too) TheOneAndOnlySM Linux - Software 6 10-17-2003 08:12 PM
Ugly fonts Paul E Slackware 6 04-12-2003 10:22 PM


All times are GMT -5. The time now is 11:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration