Ubuntu install log 6: Finally, OS X like font rendering in Linux!

Ok, I promise. This will be my last post on font rendering in Linux!

As usual, while tweaking some of the Linux font settings, I accidentally discovered that you can make X render fonts **exactly** as in OS X! (Don’t ask me how it works. I do not know. But it works perfectly!)
This is what I did:

  • Removed all the existing font customizations that I have done earlier
  • Made sure that I do not have a .fonts.conf in home directory.
  • Made sure that only the default .conf files that shipped with Dapper are in /etc/fonts folder.
  • Ensured that I have the Turners cleartype patch installed.(If you do not know how to apply patches or if you are too lazy to apply your own patch, grab the precompiled patched binaries from here.). Update: Ubuntu Edgy Eft users can get precompiled binaries with Turner’s patch here.
  • Made sure that I have all the .ttf fonts from my Windows installation in Ubuntu too.
  • Reconfigured fontconfig by running:
sudo dpkg-reconfigure fontconfig

On the first screen, I selected “None” and on the second and third screens I said no. Fontconfig will update your font settings and regenerate your font cache.

Turned on sub-pixel rendering in gnome font settings.

Restart X: ctrl+alt+backspace.

Here are some screenshots: (Tahoma never looked so better.)

Font preferences:

gnome-font.png
Apple website

apple.png
Nautilus:

nautilus.png

Digg home page:

digg.png

This post as it was typed:

screenshot-1.png

This blog post (Using wordpress preview. Look at Lucida Grande in all its glory!)

my-two-cents.png

Update : Turns out that Mac uses “byte code interpretation” to achieve this font rendering. The fontconfig that we do in the above steps turns on BCI in freetype too. Hence the similar rendering effects. Because of this, you don’t need to install Turner’s patches – so ignore step 4.

29 thoughts on “Ubuntu install log 6: Finally, OS X like font rendering in Linux!

  1. hi dudes. I had problems when I trie dto install the binary packages you linked here, it wanted to downgrade some packages so I didn’t wanted to follow with your guide. I’m a os x user and I thank to you this great tip for linux, but well, I think I’m not able to install it:/
    Thanks anyways.

  2. @jp:

    To achieve these effects you DO NOT need to install anything. All you have to do is “sudo dpkg-reconfigure fontconfig” and select the options as indicated in the post.

  3. hi. thanks for replying.
    Ok, but what’s about the Turners cleartype patch? I had problems installing it:/ ’cause I cannot install some dev-packages I got when I installed aiglx:/

  4. now I could! But I had to reinstall ubuntu :9
    Now I’m going to try if I can install aiglx without broke the fontconfig patches. thanks :9

  5. @jp

    Congrats and welcome to the wonderful world of linux and hacking.
    Try the quinn repository for aiglx. The forums are pretty helpful and the setup is also pretty easy.

    All the best.

  6. You can get it from your Windows installation if you have one. Otherwise, internet is your only option. If you still could not find it, drop me a mail.

  7. Same question as Mikael. I tried this, but failed to get install Turner’s patch on Edgy. Could you tell us little more hint on that?

  8. To mimic Apple-like rendering for fonts, I have always used the BCI with no hinting, looks very Apple-like, I know cause I own a Macbook as well. There is a font that is pretty good to use with Ubuntu its Luxi or Freetype, I think Freetype, looks really good with almost everything.

    I use the following:

    Sans-serif: Freetype-sans
    Serif: Utopia
    Monospace: Courier 10pitch

    it looks really good.

  9. Pingback: My Two Cents
  10. Its great!!

    i’m using debian, and it worked just fine. Monaco finally looks good. However, two problems emerged:
    1) Pixel (or bitmapped?) fonts like ProggyClean dont render great
    2) Emacs overwrites that configuration (it uses its own rendering).

    goddam emacs…

  11. Preparing the Home to Prevent Fire & FlamesPreventing the home fire is the right authority
    to impart some sort of Nuru Massage London. Chavez said when
    he talked to him, he had no idea that you needed quality products
    for fire detection. Holiday Nuru Massage London
    Tip #3: It is not desirable to put the pipes where they
    belong. Fire action signs Are used to inform the reader of what to do when it really happens.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s