Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Good fonts under Linux - NOT software
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
xcable
Guru
Guru


Joined: 15 Aug 2002
Posts: 424
Location: College Station, Texas

PostPosted: Mon Jan 15, 2007 3:42 am    Post subject: Good fonts under Linux - NOT software Reply with quote

Not really a how-to, but something anybody looking for good looking fonts for Linux should know.

Get a monitor/LCD with a dpi* at or near 96 to 100.

*dpi = dot per inch

This is, by far, the most important thing you can do to make your fonts look "good".

Examples :

Acer AL2017 (20 inch) the length is 16 inches horizontally and the resolution is 1400x1050.
1400/16 = 87.5 dpi
Not so good on fonts under Linux.

Now for my laptop with is 1400x900 and is 14.5 inches horizontally.
1400/14.5 = 96.55
Very good fonts under Linux.

The two systems have exactly the same tweaks to make the fonts render the same on each system. Using the free autohinter or BCI, the Laptop always looks better. The holds true for Windows also. But Windows is still better at font rendering than Linux is (freetype and Xorg), and this is something we have accepted because it may never change (patent issues).

My suggestions is to purchase a LCD monitor with at least 1600x1200 resolutions or get a CRT. I have a 1280x1024 19 inch LCD and my co-worker has a 1600x1200 21 inch LCD, and his fonts look amazing compared compare to mine (both running Gentoo Linux and KDE).

--
heath holcomb
Back to top
View user's profile Send private message
Phenax
l33t
l33t


Joined: 10 Mar 2006
Posts: 972

PostPosted: Mon Jan 15, 2007 4:01 am    Post subject: Reply with quote

My DPI is around 80.9.. 17.8 inches wide and 1440x900. (19" Widescreen)

An example of my fonts.
Back to top
View user's profile Send private message
xcable
Guru
Guru


Joined: 15 Aug 2002
Posts: 424
Location: College Station, Texas

PostPosted: Mon Jan 15, 2007 4:23 am    Post subject: Reply with quote

Phenax, yours look good. Please share you setup (Xorg, freetype versions, .font.confs).

--
heath
Back to top
View user's profile Send private message
Phenax
l33t
l33t


Joined: 10 Mar 2006
Posts: 972

PostPosted: Mon Jan 15, 2007 4:48 am    Post subject: Reply with quote

My system is ~amd64 and I unhardmasked Freetype-2.2.1. Though, if you just get the latest unhardmasked version, it should look very similar.

xorg-server-1.1.1-r4
freetype-2.2.1

My xorg.conf
My ~/.fonts.conf

Oh, and for Firefox, you probably want to go to
edit->preferences->content
Change the default-font to sans-serif, hit advanced for Fonts & Colors, change Serif and Sans-Serif to sans-serif (I know.. But mine wasn't set to that by default!)

Sans-serif truetype fonts tend to look best.
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Thu Jan 18, 2007 7:15 am    Post subject: Reply with quote

Follow the link in my signature.
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors
Back to top
View user's profile Send private message
eMPee584
Apprentice
Apprentice


Joined: 01 Nov 2003
Posts: 152
Location: Aachen, Germany

PostPosted: Fri Feb 16, 2007 8:39 pm    Post subject: my font config ;=) Reply with quote

I have set my KDE to mainly use Luxi Sans@10Pt, especially as standard browser font, for toolbars and menus and file names in konqueror. For Fixed width I use Bitstream Vera Sans Mono@10Pt and in the taskbar Gentium@9Pt, Desktop font is Sans Serif and for window titles I even use Arial@10Pt. Here's a shot 8)
http://synth-worldz.de/pr/fonts-fonts-fonts.png
_________________
"You cannot teach people anything. You can only help them discover it within themselves." --Galileo
expand your state of mind by not watching tv =)
- .... .. ... .-- --- .-. .-.. -.. .. ... .-- . .-.. .-.. .-- .. -.-. -.- . -..
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Wed Mar 28, 2007 12:53 am    Post subject: Reply with quote

Another thing -- unless you set the DisplaySize parameter in xorg.conf, X may very well take your fatass high-res monitor and render at 75 dpi anyway. Here's how to make sure X is taking advantage of your monitor's capability.

As somebody mentioned already, the magic minimum effective resolution needed to render fonts decently seems to be 96dpi. That's a product of your X configuration as well as your physical display. You can see what effective resolution (i.e. "dpi") you're getting like this:
Code:
$ xdpyinfo |grep resolution
  resolution:    96x96 dots per inch
$ xdpyinfo |grep dimensions
  dimensions:    1368x1024 pixels (363x272 millimeters)

If it's 96 or above, you're golden and probably shouldn't bother to read on. If not, you can fix it by setting / adjusting DisplaySize in xorg.conf:
Code:
Section "Monitor"
             .
             .
             .
        DisplaySize     360 270
EndSection
The arguments are the physical size of your display area in millimeters. Mine is 360mm x 270mm.

Unless you've set the DisplaySize parameter explicitly in xorg.conf, you may find that X is making an assumption about your display and that the value it's using is far from optimal. So even if your display is more than capable of 96dpi, you might be getting 75 or something.

I started by actually getting out a ruler and measuring my display area to the best of my ability, then rounded the figures to get a correct 4:3 ratio between the numbers. Setting my DisplaySize to "360 270" yielded the following effective resolutions at various system resolutions:

* 112x112dpi@1600x1200
* 98x98dpi@1400x1050
* 90x96dpi@1280x1024

You can estimate the dpi a given DisplaySize will give you at various resolutions mathematically (shown below) and then test them empirically (by setting DisplaySize in xorg.conf, restarting X, and then checking with xdpyinfo). The results between these two methods won't match precisely -- I think this is not a smooth linear function in X but some kind of step function. While dpi is quite simply dots / inches, it's useful to work in mm because that's what xorg.conf takes as DisplaySize arguments. E.g:

pixels*25.4/millimeters=dpi
i.e. 1600*25.4/360=112.8888

You will also notice that, although I set DisplaySize to be 360 270 in xorg.conf, X has decided that it is "363x272 millimeters" (as reported above by xdpyinfo). However, setting 363x272 in xorg causes X to adjust to something slightly different again. So I just settled on 360 270 as a nice round number that seemed to achieved close to 96dpi at the minimum resolution I use. You don't really have to use the real physical dimensions of your display, but I chose to.

Then I actually went on to create a custom modeline that achieves precisely 96x96dpi with DisplaySize 360 270. (I'm running at "1368x1024 @ 85 Hz"). I'm not sure I really got a perceptible improvement over 1280x1024, but it's at least as clear and I get a bit more real estate to work in. (If you're interested, see the man page gtf(1).) Also in "Section Monitor", it looks like this:
Code:
        # Custom modeline 1368x1024 @ 85.00 Hz (GTF) hsync: 91.38 kHz; pclk: 170.32 MHz
        Modeline "1368x1024"  170.32  1368 1464 1616 1864  1024 1025 1028 1075  -HSync +Vsync

As to the fonts, I like:
Screen Font: Bitstream Vera Sans Roman 11pt
Fixed Width / Terminal: Luxi Mono 10pt
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Mar 28, 2007 1:49 am    Post subject: Re: Good fonts under Linux - NOT software Reply with quote

xcable wrote:
Not really a how-to, but something anybody looking for good looking fonts for Linux should know.

Get a monitor/LCD with a dpi* at or near 96 to 100.

*dpi = dot per inch

This is, by far, the most important thing you can do to make your fonts look "good".

Examples :

Acer AL2017 (20 inch) the length is 16 inches horizontally and the resolution is 1400x1050.
1400/16 = 87.5 dpi
Not so good on fonts under Linux.

Now for my laptop with is 1400x900 and is 14.5 inches horizontally.
1400/14.5 = 96.55
Very good fonts under Linux.


It is true that the quality of the display device is important, but nowadays, almost anything has enough quality level. Most times it is just missconfiguration. If you set your correct dpi, choose the fonts wisely, and turn on antialias if using true type fonts, everything should be set.

Quote:
The two systems have exactly the same tweaks to make the fonts render the same on each system. Using the free autohinter or BCI, the Laptop always looks better. The holds true for Windows also. But Windows is still better at font rendering than Linux is (freetype and Xorg), and this is something we have accepted because it may never change (patent issues).


I particularty don't care if it is better or not, but in my case, I have yet to see a windows installation that can match my linux desktop in which regards font rendering. I suppose it is all about opinions, I think this text is much clearer. Windows can't beat it even if you use cleartype (in fact, cleartype makes the font so blurred that depending on many factors, can be even worse.
Back to top
View user's profile Send private message
j0mt31x
n00b
n00b


Joined: 04 Sep 2006
Posts: 15
Location: Barcelona

PostPosted: Wed Mar 28, 2007 2:36 am    Post subject: Reply with quote

those who like M$ fonts might want to have a look at this:

http://www.ubuntuforums.org/showthread.php?t=208396

sorry for the blasphem
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Wed Mar 28, 2007 8:30 pm    Post subject: Reply with quote

Thanks. Now a bunch of people who already know how to install fonts in Gentoo (or any Linux system, probably) have a nice link to a thread showing how to use Debian's package management system to install Microsoft fonts in Ubuntu. That's helpful.
:?
Back to top
View user's profile Send private message
j0mt31x
n00b
n00b


Joined: 04 Sep 2006
Posts: 15
Location: Barcelona

PostPosted: Wed Mar 28, 2007 8:44 pm    Post subject: Reply with quote

dude, the packages mentioned on the thread are available on gentoo too, and modyfing some xml files is no big deal for a gentoo user. actually, it is way more complicated to install the distro.

anyway, i am not encouraging people to do that tweaking. i find it disgusting to have a windows looking desktop like that, but some users may like it. gentoo is about choice, isn't it?
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Thu Mar 29, 2007 12:07 am    Post subject: Reply with quote

Yeah, you're right. Sorry - I was low on caffeine. :)
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 773

PostPosted: Sat Apr 07, 2007 4:13 am    Post subject: What if you use a projector? Reply with quote

I'm using a DLP XGA projector, so I have an (approximately) 102" screen.

My question is - what is the appropriate DisplaySize in such a situation?
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Sat Apr 07, 2007 8:11 am    Post subject: Reply with quote

BoneKracker

I had a look through the parts you identified and found that I have a resolution of 89x87 dots per inch and dimensions of 1440x900 pixels (411x263 millimeters). I then measured my display and it is pretty spot on. Is there a way I can get my resolution up.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Mon Apr 09, 2007 4:51 pm    Post subject: Reply with quote

You can artificially force X to load with a "dpi=96" command option. That's the easy way.

Alternatively, you can adjust your displaysize, that will change the dpi that is yielded at any given pixel-resolution. Keep in mind that your monitor may be spreading or contracting the image a bit, so don't be afraid to put in dimensions that don't precisely match what you measured.

In fact, there really isn't any reason the dimensions you enter have to match reality at all (my instincts just tell me things will work out better if they are, because that is probably guiding the software to adhere more closely to the hardware design).

1400 "dots" divided 96 = inches
convert inches to mm and that's the number that goes in the DisplaySize parameter

(of course, you have to do it once for the X dimension and once for Y)

After you adjust it, you can check again with xdpyinfo to see how it came out. It's not a smooth function (I think it's a step function), so you'll have to play with the numbers a bit to get it to come out at exactly 96.

If you just want it "higher", pick your target (e.g., 120) and do the same procedure (or use the command line option).

If you set it to something other than 96, though, make sure any settings you have in your windows manager and/or apps match it (e.g. gnome, kde, firefox).
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Tue Apr 10, 2007 6:53 am    Post subject: Reply with quote

I have a 1280x800 laptop display, which is about 12" diagonally... 125x125 DPI! Fonts look exceptional on this thing at proper DPI, with some tweaks (BCI and the correct subpixel/hinting/etc. options - nothing fancy, or even out of the amd64 stable portage tree). Sample screenshot.

(See the menus on Konqueror? The labels on them (Location, Edit, etc.) are a size SEVEN font. Yes, that's what insane DPI does to font sizes!)
Back to top
View user's profile Send private message
leonglass
Apprentice
Apprentice


Joined: 08 Aug 2006
Posts: 278

PostPosted: Tue Apr 10, 2007 9:06 am    Post subject: Reply with quote

I have to say I am not sure I should bother. On this site the fonts look a little bit scrappy but on a lot of other sites the fonts look as good as the screenshot from broken_chaos.
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sun Apr 15, 2007 2:33 pm    Post subject: Reply with quote

Mine look fine at 89x87
http://abbottdavid.com/pictures/2007-04-15-102956_1440x900_scrot.png
_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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