Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Make your fonts very very nice in gecko-based browsers

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
makzu
n00b
n00b
User avatar
Posts: 42
Joined: Mon Jun 28, 2004 7:31 am

Make your fonts very very nice in gecko-based browsers

  • Quote

Post by makzu » Sat Sep 04, 2004 8:07 am

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: Select all

nano -w ~/.thunderbird/default/(random characters)/user.js
Then paste the following text into the file:

Code: Select all

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.
Last edited by makzu on Tue Sep 14, 2004 9:22 pm, edited 2 times in total.
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe.
All mimsey were the borogroves,
And the mome raths outgrabe.
Top
finr
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Tue Feb 24, 2004 1:15 pm

  • Quote

Post by finr » Sat Sep 04, 2004 10:38 am

Thanx, firefox sure looks a lot nicer now :)
Top
Drunken Master
n00b
n00b
Posts: 3
Joined: Sat Sep 04, 2004 4:03 pm

  • Quote

Post by Drunken Master » Sat Sep 04, 2004 4:10 pm

Why not enable auto hinting directly in fontconfig?
Top
kamagurka
Veteran
Veteran
User avatar
Posts: 1026
Joined: Sun Jan 25, 2004 1:55 am
Location: /germany/munich
Contact:
Contact kamagurka
Website

  • Quote

Post by kamagurka » Sun Sep 05, 2004 10:48 pm

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
Top
makzu
n00b
n00b
User avatar
Posts: 42
Joined: Mon Jun 28, 2004 7:31 am

  • Quote

Post by makzu » Mon Sep 06, 2004 12:04 am

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.
Top
kamagurka
Veteran
Veteran
User avatar
Posts: 1026
Joined: Sun Jan 25, 2004 1:55 am
Location: /germany/munich
Contact:
Contact kamagurka
Website

  • Quote

Post by kamagurka » Mon Sep 06, 2004 9:03 am

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
Top
makzu
n00b
n00b
User avatar
Posts: 42
Joined: Mon Jun 28, 2004 7:31 am

  • Quote

Post by makzu » Mon Sep 06, 2004 4:57 pm

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: Select all

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.
Top
kamagurka
Veteran
Veteran
User avatar
Posts: 1026
Joined: Sun Jan 25, 2004 1:55 am
Location: /germany/munich
Contact:
Contact kamagurka
Website

  • Quote

Post by kamagurka » Mon Sep 06, 2004 5:36 pm

hmm.
no effect...
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Top
PaV
Apprentice
Apprentice
Posts: 176
Joined: Wed Jan 28, 2004 6:51 pm
Location: Poland

  • Quote

Post by PaV » Mon Sep 06, 2004 6:23 pm

no effect here too :(
Top
neenee
Veteran
Veteran
User avatar
Posts: 1786
Joined: Sun Jul 20, 2003 12:15 pm

  • Quote

Post by neenee » Mon Sep 06, 2004 7:24 pm

ditto.
Top
grzewho
l33t
l33t
User avatar
Posts: 626
Joined: Tue Dec 31, 2002 12:30 pm
Location: /home/g

  • Quote

Post by grzewho » Tue Sep 07, 2004 5:17 pm

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: Select all

USE="freedom -software_patents" emerge --deep --update world
Top
chunderbunny
Veteran
Veteran
User avatar
Posts: 1281
Joined: Mon May 31, 2004 11:28 am
Location: 51°24'27" N, 0°57'15" W

  • Quote

Post by chunderbunny » Tue Sep 07, 2004 5:26 pm

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.
Top
max4ever
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 87
Joined: Thu Jul 29, 2004 11:37 am
Location: almost in hell

  • Quote

Post by max4ever » Wed Sep 08, 2004 2:42 pm

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.
Top
sog
Guru
Guru
User avatar
Posts: 356
Joined: Sun Apr 04, 2004 8:18 pm

  • Quote

Post by sog » Wed Sep 08, 2004 6:07 pm

Code: Select all

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/
Top
makzu
n00b
n00b
User avatar
Posts: 42
Joined: Mon Jun 28, 2004 7:31 am

  • Quote

Post by makzu » Wed Sep 08, 2004 11:59 pm

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.
Top
makzu
n00b
n00b
User avatar
Posts: 42
Joined: Mon Jun 28, 2004 7:31 am

  • Quote

Post by makzu » Thu Sep 09, 2004 12:02 pm

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.
Top
Post Reply

16 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic