How to turn off font smoothing? - Solved

Booting, installing, newbie
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

How to turn off font smoothing? - Solved

#1 Post by disciple »

It seems to me that screen fonts are automatically smoothed in Puppy. My eyes do not like this - does anyone know if there is a way to turn it off?
Thanks
Last edited by disciple on Wed 20 Sep 2006, 00:23, edited 1 time in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

I asked about JWM and font smoothing/antialiasing on the BSDGeek forum, and Joe has now added the answer to the JWM configuration page http://www.joewing.net/programs/jwm/config.shtml - click on "Fonts".

The short answer is that to turn off antialiasing for individual elements controlled by JWM - tooltip text, title bar text, root menu (the menu from the start button) text, taskbar/panel button text, tray button text, and taskbar clock text - you open .jwmrc, find the entry for the element you want to change, and make it look something like this:

<Font>FreeSans-12:bold:antialias=true</Font>

the :antialias=true is the only relevant part.

This does not really fix my problem, and does not tackle text inside of programs.

I now realise that while most fonts look really blurry in Puppy, fonts in a console are great and icon text looks great, and when I try another distro (Mepis) the fonts are much clearer.

Maybe the problem has something to do with video card drivers, or how we do X or something - I don't know.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#3 Post by Sit Heel Speak »

Much of it has to do with "how we do fonts in X", chiefly FreeType; the library we use is libfreetype*.6.x.x, and I forget whether it's in /usr/X11R6/lib or /usr/lib (or /usr/X11R7/lib in Puppy 2.10-alpha) (Sorry, I can't check, I'm in Windows at the moment). The configuration files for FreeType in Puppy are /etc/fonts/fonts.conf and /etc/fonts/local.conf, and the designer, Keith Packard, intends that you edit only local.conf--there, is the place to put your antialiasing true or false commands, your subpixel hinting on or off commands, your BCI hinting on or off commands, and so forth.

I don't remember what versions of FreeType the various Puppy versions use, but up through 2.01r2 it is safe to say that, if you visit www.freetype.org and download and compile and install FreeType 2.1.10, you won't break any apps in Puppy. Compiling FreeType 2.1.10 with BCI hinting and PostScript activated, and BCI hinting and antialiasing and subpixel rendering turned on in local.conf, gives you the ability to see TrueType fonts, including the excellent Bitstream Vera and DejaVu font families, and Type 1 fonts much clearer than if BCI hinting is not turned on--at least, in apps which use FreeType. The Mozilla builds in Puppies 1.0x and the Seamonkey builds in Puppies 2.0x do indeed benefit from using FreeType 2.1.10 with BCI hinting compiled in and turned on in local.conf, but Firefox builds in all Puppies up til now do not use FreeType and do not benefit from tweaks to it (except, I have not tried the Firefox build in Puppy 1.09CE). Open Office up through version 2.02 (OO version, not Puppy version) and AbiWord do not benefit from upgrades to FreeType, for various reasons.

The newest FreeType, 2.2.1, with BCI hinting and PostScript compiled in and turned on, is of even better benefit than FreeType 2.1.10 to the Seamonkey builds in Puppies 2.0x, but it breaks Open Office up through version 2.02. I haven't tested FreeType 2.2.1 yet with OO 2.03. The FreeType maintainers expect OO to come into compliance with FreeType 2.2.1 any day now, and then OO (either 2.03 or 2.04) will benefit enormously from FreeType tweaks.

I intend to have much more to say on this subject in the not-too-distant future. The screenshot below is what sans-serif fonts look like in Mozilla under Puppy 1.08, when FreeType 2.1.10 is compiled with BCI hinting and Postscript active, with antialiasing and BCI hinting turned on in local.conf (EDITED: I've shrunk the image a bit, to keep page width reasonable. In shrinking it, it lost a little clarity. The actual screen looks better than this).

With FreeType 2.2.1 similarly tweaked, Seamonkey in Puppy 2.01r2 looks even better. I suspect that it is possible for both Seamonkey and Firefox to attain absolute font perfection with additional compile-time tweaking, local.conf customization, careful gamma calibration, and close attention to dpi settings in several configuration files.
Attachments
Sans serif fonts at size 8 point with FreeType tweaked.png
(69.48 KiB) Downloaded 810 times
Last edited by Sit Heel Speak on Mon 28 Aug 2006, 07:47, edited 2 times in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

You certainly are knowledgeable on this subject.
It would be nice if we could get Puppy looking crisper - as it is I tend to stay in Windows as it's easy on my eyes.
BTW I thought Puppy 2 is a lot worse than 1, but I may have been wrong, as I got an LCD monitor about the time Puppy 2 came out, and it may just look worse on it.
Why do Rox and RXVT look so good though?

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#5 Post by Sit Heel Speak »

Rox and rxvt by default use fixed-size fonts which are small enough that they look acceptable without hinting. If memory serves, they use Helvetica. Helvetica looks awful at sizes above 10 point and so is unacceptable as an all-purpose sans-serif web font. I have my Rox and rxvt set to use DejaVu Sans; it looks better than Helvetica after the tweaks are done.
disciple wrote:You certainly are knowledgeable on this subject.
I had to become so. I am unwilling to commit to further use of Microsoft Windows, but I, too, simply will not tolerate fonts that aren't crisp. One big reason why Puppy and most other Linuxes are not crisp as supplied, is that Apple holds a key patent on TrueType bytecode interpreter (BCI) hinting. Therefore, while practically all Linux distros utilize FreeType, only very few supply FreeType with its BCI hinting algorithm compiled in; all the maintainers are unwilling to risk drawing a patent lawsuit from Apple. So, if you want acceptable-looking fonts in Linux, you must download the FreeType source code and do the proper editing of one header file, and then the compiling and installing, yourself. It isn't hard.
disciple wrote:BTW I thought Puppy 2 is a lot worse than 1, but I may have been wrong, as I got an LCD monitor about the time Puppy 2 came out, and it may just look worse on it.
If you build and install FreeType 2.1.10, either Puppy 1 or 2 looks acceptable. If you build and install the latest FreeType (2.2.1) and the latest libXft (2.1.10) and the latest fontconfig (2.3.95), webpages look quite good, but you can't use Open Office--yet. Whether the web looks better my way than in XP/IE with ClearType turned on, is a matter of individual taste. On my laptop, I far prefer Seamonkey in Puppy 2.01r2, with these tweaks, over IE6 under Win98. On my desktop, which has a 19" 1280x1024 TFT monitor, Puppy is entirely useable but does not have the crispness of Windows--this probably stems from the computer's carrying an Intel 865 Extreme Graphics onboard adapter, for which perhaps the Linux driver is not highly developed--or perhaps I just don't have the latest one, I haven't looked on the Intel website.

The above-mentioned BCI hinting and subpixel rendering and antialiasing are the keys to text looking sharp on an LCD or TFT monitor. Gamma and dpi settings are also important. These five things really should all be adjusted during Puppy's initial setup, automatically, to fit the display adapter and the monitor, but aren't--largely because of the above-mentioned patent situation.

I'll be happy to guide you through the procedure, if you're game. As far as I know, Apple has not sued anyone, neither private individual nor corporation, for turning on BCI hinting in their own FreeType.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#6 Post by disciple »

Thanks for the offer, but I think I might wait and do it properly when openoffice works with it and I have more time. Has anybody documented it either in the forum or the Wiki? (don't go looking if you don't know - I will) - I think it would be very useful.

Strange as it may seem, I actually have cleartype turned off in Windows - I prefer it really crisp and not smooth than smooth and a little blurry.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#7 Post by Sit Heel Speak »

disciple wrote:Thanks for the offer, but I think I might wait and do it properly when openoffice works with it and I have more time. Has anybody documented it either in the forum or the Wiki? (don't go looking if you don't know - I will) - I think it would be very useful.
It would be useful only if up-to-the-minute, otherwise confusing and misleading. FreeType, fontconfig, libXft, Open Office, the Gnome libraries, and the Mozilla apps have all evolved fast recently, and I suspect the new T2 compile environment which is being introduced in various new Linux distros, including Puppy 2.10, is going to speed up the evolution. Thus, keeping a Wiki article current would be a tough challenge. Even aside from the quick obsolescence, whether to antialias or not, etc., is such a matter of personal taste and the qualities of the individual display that it would be a labor of Hercules to write a "one size fits all" how-to.

Someone posted a "libfreetype 6.3.8 that works better" dotpup awhile back, which may have had BCI hinting compiled in, I don't know; I compiled my own first, before discovering that previous posting. It is possible that if you use a pre-2.03 version of Open Office with that older libfreetype and Puppy 2.02 or lower, it might work.

Scattered postings mention how and where to set dpi, but as far as I know the information is not collected all in one place. I have found five files in Puppy where dpi is specified. I find it best to specify the display's actual physical dpi, which on my 14.1" Thinkpad's LCD is 91. On my 19" Dell TFT it is 87.

The best gamma setting program I know is Monica.
disciple wrote:Strange as it may seem, I actually have cleartype turned off in Windows - I prefer it really crisp and not smooth than smooth and a little blurry.
Some TFT monitors look crisper with it on. At home I still use Windows 98 when I can't use Puppy. At work (real estate office) I generally leave it on when composing mixed text and graphics (e.g. house-for-sale flyers), off otherwise.
Last edited by Sit Heel Speak on Mon 28 Aug 2006, 15:36, edited 1 time in total.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#8 Post by Dougal »

Disciple, could you just add "SOLVED:" at the beggining of the thread name, please.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Post Reply