[HowTo] Turn On/Off Font Antaliasing

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

[HowTo] Turn On/Off Font Antaliasing

#1 Post by Iguleder »

Turn On/Off Font Antaliasing by Iguleder

This guide instructs you how to enable or disable font antialiasing (smoothing) and hinting. Antialiased fonts appear smooth, without sharp corners, in contrast with un-antialised fonts, which are sharp.

Changelog:
27/8/09: after some research, changes.
13/8/09: first version.
___________________________________

BEFORE DOING IT:
- In Puppy, by default, it's turned on for JWM. However, if you want to install XFCE/KDE/GNOME, I *think* it's off by default for them.
- Choose between on and off. You can reverse the changes (delete the created files) and try both modes.
- This is easy. Don't panic.

REQUIREMENTS:
- Linux.

___________________________________

Step 1: for JWM.

Choose between on and off. Turning antialiasing fonts will result in sharp fonts, which may be unreadable on some LCD monitors. Generally, it is recommended that you turn it on for LCD monitors and off for CRT monitors.

(Left: off, right: on, see the difference)
Image

Step 2: copy the code.

On:

Code: Select all

<match target="font">
 <edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
 <edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintfull</const>
</edit>
</match>
Off:

Code: Select all

<match target="font">
 <edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
 <edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintnone</const>
</edit>
</match>
Open Geany ('edit' icon on your Puppy desktop) and paste the code (CTRL + V). Then save the file as /root/.fonts.conf (attention: there's a dot before "fonts").

Step 3: for GNOME/XFCE (only if you have any).

Go to the console, and run:
cp /root/.fonts.conf /etc/fonts/local.conf

Enjoy, fellow mates. :wink:
Last edited by Iguleder on Thu 27 Aug 2009, 10:41, edited 2 times in total.

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

#2 Post by Sit Heel Speak »

(deleted in penitence by poster)
Last edited by Sit Heel Speak on Fri 14 Aug 2009, 21:24, edited 1 time in total.

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

#3 Post by Sit Heel Speak »

deleted by poster who is scourging self to do penitence
Last edited by Sit Heel Speak on Fri 14 Aug 2009, 21:25, edited 1 time in total.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#4 Post by Iguleder »

Me wrote:- In Puppy, by default, it's turned on for JWM.
Right. Yawn.

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

#5 Post by Sit Heel Speak »

deleted by poster who humbly beseeches forgiveness
Last edited by Sit Heel Speak on Fri 14 Aug 2009, 21:25, edited 1 time in total.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#6 Post by Iguleder »

Sit Heel Speak wrote: Let go your ego
Yeah, sure. :?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#7 Post by mikeb »

cp /root/.fonts.conf /etc/fonts/local.conf
finally I now know why I have always had georgous fonts on puppy 2.xx with xfce4 including on firefox but was puzzled to not have that on puppy 4..I guess the installer did this for me

I can now sleep soundly

mike

firepants-jr
Posts: 13
Joined: Thu 06 Aug 2009, 02:10
Location: Tulsa, OK, USA
Contact:

we all can't be top dog.

#8 Post by firepants-jr »

Iguleder wrote:
Sit Heel Speak wrote: Let go your ego
Yeah, sure. :?
I appreciate your effort to contribute. Discouraging member contribution runs contrary to the spirit of the Linux community. Ignore detractors and keep helping in whatever works best for you.

Thanks. :D

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#9 Post by Iguleder »

About the "let go your ego", I don't see where it fits. The only one who doen't "let go your ego" is the person who said this! He tells me to "let go my ego" while he links to his post (he's trying to prove that downloading a huge .PET is a better way to turn on antialiasing, actually)!

I'm just trying to contribute from my knowledge and my experience, I'm not trying to hurt anyone. That's my thing.

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#10 Post by trio »

Iguleder wrote:About the "let go your ego", I don't see where it fits. The only one who doen't "let go your ego" is the person who said this! He tells me to "let go my ego" while he links to his post (he's trying to prove that downloading a huge .PET is a better way to turn on antialiasing, actually)!

I'm just trying to contribute from my knowledge and my experience, I'm not trying to hurt anyone. That's my thing.
No worries, just do your thing, somebody else might find it useful. :wink: Cool down......whoosa

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#11 Post by mikeb »

With a forum this size its not uncommon for there to be duplicate information ... I actually though Sit Heel Speak was dealing with more than just a quick fonts.conf fix for browser rendering which I posted elsewhere too ...
At the end of the day everyone is simply trying to help with information that they have gathered themselves.....I certainly have no ambitions to be top dog....in fact I'm not sure if I have an ego :D

mike

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

Re: we all can't be top dog.

#12 Post by Sit Heel Speak »

firepants-jr wrote:Discouraging member contribution runs contrary to the spirit of the Linux community
Too-shay, friend. You are 100% correct. I stand corrected, admit my offense, and humbly beg forgiveness.

May I inquire, Iguleder,--if you will countenance my daring to approach, after my insolent first reaction, so full of my own ego-- on what Puppy, and under what window manager, you have found this elegant solution to be of benefit?

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#13 Post by Iguleder »

On both 4.2.1 and my custom dpup (476). It should work on all Puppies.

As I said, it's on for by default in JWM, but off in XFCE/GNOME, so it may be useful for NOP users, for instance.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#14 Post by mikeb »

Ok xfce on 4.12...copied /etc/fonts/fonts.conf as is to /root/.fonts.conf and voila those perfect fonts I've been used to in puppy 2 in firefox...better than my original file hyjacked from ubuntu...(gave coloured edges to fonts)

Why the difference between puppy versions....different versions of gtk2/pango etc have their config files in different places...the daft barstewards :D

mike

edit...its probably the version of gtk2 that the browser was compiled against maiking a difference

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

#15 Post by Sit Heel Speak »

I just tried making a bci-hinting-enabled libfreetype PET for 4.12-regular.

Official Puppy 4.12, with my .pet installed, looks awful! Whereas, simply writing iguleder's code to /root/.fonts.conf, but not to /etc/fonts/local.conf, looks great! In fact, this "4.12-iguleder" looks very nearly as good as 4.20 looks with my full bci font tweaks.

upup-466 does not improve with bci tweaking, either. I think I'll go try iguleder's method...

It must be as mikeb says: different ways that gtk, pango/cairo, libXft, Seamonkey are compiled, in different Puppies means that these different methods of font tweaking, produce different results on different Puppy versions.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#16 Post by Iguleder »

I guess all Pango and GNOME-based-applications use /etc/fonts/local.conf, as GNOME itself, and plain GTK applicatins use /root/.fonts.conf.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#17 Post by mikeb »

It must be as mikeb says: different ways that gtk, pango/cairo, libXft, Seamonkey are compiled, in different Puppies means that these different methods of font tweaking, produce different results on different Puppy versions.
yep seems like a black art to me..I just stumble on something that works and then don't touch...scientific eh :wink:

mike

User avatar
paulh177
Posts: 975
Joined: Tue 22 Aug 2006, 20:41

#18 Post by paulh177 »

I've created an "on" .fonts.conf, and this has made Opera properly usable (without having to squint) on Puppy, but I get the following complaint when I start an app from the command line:

Code: Select all

Fontconfig warning: "~/.fonts.conf", line 13: invalid constant used : hintall
Running on 430beta, frugal, on acer ascpire one

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#19 Post by Iguleder »

It should be "hintfull" instead of "hintall", my mistake. Updated the tutorial.

puppyite

#20 Post by puppyite »

I’ve tried turning antialiasing off in Puppy and fonts look unacceptably jagged on all my CRT’s.

I note that in Ubuntu 8.04 Live in System, Preferences, Appearance, Fonts tab if I select Best Shapes it seems to help. When I say help I mean that this setting looks better than any of the other possible settings. I understand that Puppy and Ubuntu are apples and oranges by comparison but would it be possible to duplicate this setting in Puppy 4.2.1 and if so how would I accomplish this? Don’t sweat an answer because this isn’t critical for me. Thank you.

Post Reply