View previous topic :: View next topic |
Author |
Message |
xcable Guru
Joined: 15 Aug 2002 Posts: 424 Location: College Station, Texas
|
Posted: Mon Jan 15, 2007 3:42 am Post subject: Good fonts under Linux - NOT software |
|
|
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 |
|
|
Phenax l33t
Joined: 10 Mar 2006 Posts: 972
|
Posted: Mon Jan 15, 2007 4:01 am Post subject: |
|
|
My DPI is around 80.9.. 17.8 inches wide and 1440x900. (19" Widescreen)
An example of my fonts. |
|
Back to top |
|
|
xcable Guru
Joined: 15 Aug 2002 Posts: 424 Location: College Station, Texas
|
Posted: Mon Jan 15, 2007 4:23 am Post subject: |
|
|
Phenax, yours look good. Please share you setup (Xorg, freetype versions, .font.confs).
--
heath |
|
Back to top |
|
|
Phenax l33t
Joined: 10 Mar 2006 Posts: 972
|
Posted: Mon Jan 15, 2007 4:48 am Post subject: |
|
|
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 |
|
|
boniek Guru
Joined: 26 Mar 2005 Posts: 373
|
|
Back to top |
|
|
eMPee584 Apprentice
Joined: 01 Nov 2003 Posts: 152 Location: Aachen, Germany
|
Posted: Fri Feb 16, 2007 8:39 pm Post subject: my font config ;=) |
|
|
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
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 |
|
|
Bones McCracker Veteran
Joined: 14 Mar 2006 Posts: 1611 Location: U.S.A.
|
Posted: Wed Mar 28, 2007 12:53 am Post subject: |
|
|
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 |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Wed Mar 28, 2007 1:49 am Post subject: Re: Good fonts under Linux - NOT software |
|
|
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 |
|
|
j0mt31x n00b
Joined: 04 Sep 2006 Posts: 15 Location: Barcelona
|
|
Back to top |
|
|
Bones McCracker Veteran
Joined: 14 Mar 2006 Posts: 1611 Location: U.S.A.
|
Posted: Wed Mar 28, 2007 8:30 pm Post subject: |
|
|
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 |
|
|
j0mt31x n00b
Joined: 04 Sep 2006 Posts: 15 Location: Barcelona
|
Posted: Wed Mar 28, 2007 8:44 pm Post subject: |
|
|
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 |
|
|
Bones McCracker Veteran
Joined: 14 Mar 2006 Posts: 1611 Location: U.S.A.
|
Posted: Thu Mar 29, 2007 12:07 am Post subject: |
|
|
Yeah, you're right. Sorry - I was low on caffeine. |
|
Back to top |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 773
|
Posted: Sat Apr 07, 2007 4:13 am Post subject: What if you use a projector? |
|
|
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 |
|
|
leonglass Apprentice
Joined: 08 Aug 2006 Posts: 278
|
Posted: Sat Apr 07, 2007 8:11 am Post subject: |
|
|
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 |
|
|
Bones McCracker Veteran
Joined: 14 Mar 2006 Posts: 1611 Location: U.S.A.
|
Posted: Mon Apr 09, 2007 4:51 pm Post subject: |
|
|
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 |
|
|
broken_chaos Guru
Joined: 18 Jan 2006 Posts: 370 Location: Ontario, Canada
|
Posted: Tue Apr 10, 2007 6:53 am Post subject: |
|
|
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 |
|
|
leonglass Apprentice
Joined: 08 Aug 2006 Posts: 278
|
Posted: Tue Apr 10, 2007 9:06 am Post subject: |
|
|
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 |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
|
Back to top |
|
|
|