Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Make your fonts very very nice in gecko-based browsers
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
makzu
n00b
n00b


Joined: 28 Jun 2004
Posts: 42

PostPosted: Sat Sep 04, 2004 8:07 am    Post subject: Make your fonts very very nice in gecko-based browsers Reply with quote

I was digging around all over on the net trying to get information on font antialiasing, and this is pretty much what I found on the Mozilla-based browsers (including Galeon, Epiphany, Mozilla Suite, Firefox, and Thunderbird). Turning these options on makes everything niiiiiiiice and smooth. Some people might not like the way everything looks afterwards, but I like it a lot, so.

Most of these programs are easy to activate font smoothing on. For all the borwsers (everything on that list except for Thunderbird), simply type about:config (notice there's no space in there!) into the location bar. That'll bring up an interface that's used to edit various preferences that there's no other way to mess with. There's a lot of stuff in there, but we're only concerned with 3 things, really:
font.FreeType2.autohinted
font.FreeType2.enabled
font.FreeType2.unhinted


You can double-click on these options to change the values. To make a long story short, you want to set autohinted to true, enabled to true, and unhinted to false. Then, all you'll need to do is restart your browser, and your fonts will be silky smooth. You can experiment with the settings in about:config all you want to - some settings might be more pleasing to your eye than others.

For Thunderbird, things get a little tricky. There is no location bar to type about:config into, so there's no easy way to get into the configuration. So, we have to create a file called user.js.

So, in a terminal, simply type in
Code:
nano -w ~/.thunderbird/default/(random characters)/user.js


Then paste the following text into the file:
Code:
user_pref("font.FreeType2.autohinted", true);
user_pref("font.FreeType2.enable", true);
user_pref("font.FreeType2.unhinted", false);
user_pref("font.FreeType2.enable", true);
user_pref("font.freetype2.shared-library", "libfreetype.so.6");
user_pref("font.antialias.min",        0);
user_pref("font.embedded_bitmaps.max", 1000000);
user_pref("font.scale.tt_bitmap.dark_text.min", 0);
user_pref("font.scale.tt_bitmap.dark_text.gain", "0.0");
user_pref("font.directory.truetype.1", "/usr/share/fonts/ttf-bitstream-vera");
user_pref("font.directory.truetype.2", "/usr/share/fonts/TTF");
user_pref("font.directory.truetype.3", "/usr/share/fonts/corefonts");
user_pref("font.directory.truetype.4", "/usr/share/fonts/freetype");
user_pref("font.FreeType2.printing", true);


This turns on the font antialiasing, and also tweaks a few other settings. Technically, you could get away with those first three lines, but the others can't possibly hurt.

Save the file and (re)start Thunderbird. You should notice a very noticable difference in your fonts.

In addition to all of this, you can get things to look even better if you set your browser to use the ttf-bitstream-vera font family. Each browser (and Thunderbird too) should have its own font settings page, and they're all very similar. Just make sure you use Bitstream Vera Serif for Serif, Bitstream Vera Sans for Sans, and Bitstream Vera Sans Mono for Monospace. Set your minimum font size to 9 and make sure "always use my fonts/colors" are unchecked.

Bam, nice smooth fonts for your browsing and emailing convenience.
_________________
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe.
All mimsey were the borogroves,
And the mome raths outgrabe.


Last edited by makzu on Tue Sep 14, 2004 9:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
finr
Tux's lil' helper
Tux's lil' helper


Joined: 24 Feb 2004
Posts: 126

PostPosted: Sat Sep 04, 2004 10:38 am    Post subject: Reply with quote

Thanx, firefox sure looks a lot nicer now :)
Back to top
View user's profile Send private message
Drunken Master
n00b
n00b


Joined: 04 Sep 2004
Posts: 3

PostPosted: Sat Sep 04, 2004 4:10 pm    Post subject: Reply with quote

Why not enable auto hinting directly in fontconfig?
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Sun Sep 05, 2004 10:48 pm    Post subject: Reply with quote

hm.
my firefox doesn't have the mentioned entries in about:config.

but i'm updating now, i'll get back at you when i'm done.
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
makzu
n00b
n00b


Joined: 28 Jun 2004
Posts: 42

PostPosted: Mon Sep 06, 2004 12:04 am    Post subject: Reply with quote

kamagurka: I compiled firefox without the moznoxft USE flag. If you used that flag, that might be the cause of the options not showing up.
_________________
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe.
All mimsey were the borogroves,
And the mome raths outgrabe.
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Mon Sep 06, 2004 9:03 am    Post subject: Reply with quote

makzu wrote:
kamagurka: I compiled firefox without the moznoxft USE flag. If you used that flag, that might be the cause of the options not showing up.


umm, i never even heard of that flag.
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
makzu
n00b
n00b


Joined: 28 Jun 2004
Posts: 42

PostPosted: Mon Sep 06, 2004 4:57 pm    Post subject: Reply with quote

Ah. Well, in that case, you could probably just put the files in your user.js file for firefox. The file doesn't exist by default, but that's easy to fix:

Code:
nano -w ~/.mozilla/firefox/default.xxx/user.js

should do it. The '.xxx' are actually three random characters. I'd just use tab completion to find it. Once you get there, you can either paste in the three lines that I have bolded, or you can use the block I have there for thunderbird. Either one will work.
_________________
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe.
All mimsey were the borogroves,
And the mome raths outgrabe.
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Mon Sep 06, 2004 5:36 pm    Post subject: Reply with quote

hmm.
no effect...
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
PaV
Apprentice
Apprentice


Joined: 28 Jan 2004
Posts: 176
Location: Poland

PostPosted: Mon Sep 06, 2004 6:23 pm    Post subject: Reply with quote

no effect here too :(
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Mon Sep 06, 2004 7:24 pm    Post subject: Reply with quote

ditto.
Back to top
View user's profile Send private message
grzewho
l33t
l33t


Joined: 31 Dec 2002
Posts: 626
Location: /home/g

PostPosted: Tue Sep 07, 2004 5:17 pm    Post subject: Reply with quote

IMO the only way to enable hinted fonts in mozillas is to build it with xft support, in other cases the options mentioned above won`t work

or am i wrong ... ?
_________________
Code:
USE="freedom -software_patents" emerge --deep --update world
Back to top
View user's profile Send private message
chunderbunny
Veteran
Veteran


Joined: 31 May 2004
Posts: 1281
Location: 51°24'27" N, 0°57'15" W

PostPosted: Tue Sep 07, 2004 5:26 pm    Post subject: Reply with quote

There is one other option that needs enabling for this to work in Firefox:

Edit > Preferences > General >Fonts & Colors

Now make sure the "Always use my: fonts" is ticked. The setting should apply without needing to restart.
Back to top
View user's profile Send private message
max4ever
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jul 2004
Posts: 87
Location: almost in hell

PostPosted: Wed Sep 08, 2004 2:42 pm    Post subject: Reply with quote

Quote:
To make a long story short, you want to set autohinted and enabled to true, and unhinted to false


what about font.FreeType2.enabled ?
_________________
Stop posting your PC's hardware as your signature.
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Wed Sep 08, 2004 6:07 pm    Post subject: Reply with quote

Code:
There is one other option that needs enabling for this to work in Firefox:

Edit > Preferences > General >Fonts & Colors

Now make sure the "Always use my: fonts" is ticked. The setting should apply without needing to restart.


just an FYI, this completely skewed the look and feel of a bunch of sites for me as it forced my font settings on every page, overriding that provided by the site.

if that's what you're looking for, cool, but i turned it off.
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
makzu
n00b
n00b


Joined: 28 Jun 2004
Posts: 42

PostPosted: Wed Sep 08, 2004 11:59 pm    Post subject: Reply with quote

Quote:

what about font.FreeType2.enabled ?


That's the main one. You want to set that to true, and that'll turn the smoothing on.

As for the "always use my fonts/colors" checkbox, using it will make pretty much every site use the serif font. If you don't mind serifs, then that's fine, but having the box unchecked won't cause any problems.
_________________
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe.
All mimsey were the borogroves,
And the mome raths outgrabe.
Back to top
View user's profile Send private message
makzu
n00b
n00b


Joined: 28 Jun 2004
Posts: 42

PostPosted: Thu Sep 09, 2004 12:02 pm    Post subject: Reply with quote

And for more font smoothing madness, check out the X.org and fonts howto on Gentoo's Wiki. It's got a lot of information on how to smooth out your fonts in every other application, not just gecko browsers. I followed the instructions, and now everything looks very nice.
_________________
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe.
All mimsey were the borogroves,
And the mome raths outgrabe.
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