My Two Cents

Ubuntu install log 6: Finally, OS X like font rendering in Linux! | Jul 16th 2006

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.


Posted in Linux, Ubuntu

28 Comments »

  1. You are a font of information about font rendering!

    Comment by Marc — July 16, 2006 @ 1:28 pm

  2. :-)

    Comment by Jaganath — July 16, 2006 @ 5:55 pm

  3. 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.

    Comment by jp — August 1, 2006 @ 9:05 am

  4. @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.

    Comment by Jaganath — August 1, 2006 @ 9:20 pm

  5. 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 :/

    Comment by jp — August 1, 2006 @ 11:37 pm

  6. I did all you said, but I don’t have the patch, so I din’t get the ‘osx’ font hint :(

    Comment by jp — August 1, 2006 @ 11:41 pm

  7. sorry for ’spamming’ xD
    http://flickr.com/photo_zoom.gne?id=204097197&size=o
    here’s a screenshot of the apple.com/software site.
    I don’t have de windows fonts ’cause I don’t have windows!
    Thanks :)

    Comment by jp — August 1, 2006 @ 11:45 pm

  8. 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

    Comment by jp — August 2, 2006 @ 1:33 am

  9. @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.

    Comment by Jaganath — August 2, 2006 @ 12:59 pm

  10. You are a genius! Thanks!

    Comment by Arun — September 20, 2006 @ 1:42 pm

  11. How did u get the tahoma font? It’s the only font I’ve not found

    Regards

    Comment by LuisC — October 7, 2006 @ 1:54 pm

  12. 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.

    Comment by Jaganath — October 7, 2006 @ 2:23 pm

  13. Thanks buddy! Your tip is awsome! Now linux is really not only powerful, but also beautiful :) Cheers!

    Comment by paka — October 7, 2006 @ 4:08 pm

  14. How can i do this in edgy?

    Comment by Mikael — October 13, 2006 @ 9:36 pm

  15. 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?

    Comment by ZeeG — October 26, 2006 @ 11:53 pm

  16. Hi Mikael and ZeeG,

    Sub pixel font smoothing packages are now available for Edgy too. Please follow this thread on Ubuntuforums:
    http://ubuntuforums.org/showthread.php?t=235526

    Comment by jaganath — October 27, 2006 @ 7:32 am

  17. [...] I made a small update to the ever-popular post on this blog: OS X like font rendering in Linux.  The guide now covers Edgy too. Turner’s patches for Edgy are now available through a private repository. You can download it from here: [...]

    Pingback by Font smoothing on Edgy Eft « My Two Cents — October 27, 2006 @ 8:12 am

  18. 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.

    Comment by Webterractive — November 13, 2006 @ 2:48 pm

  19. [...] Top Posts Ubuntu install log 6: Finally, OS X like font rendering in Linux!Making compiz themes workUbuntu Install Log 2: Beautification of the Gnome DesktopUbuntu on PS3? [...]

    Pingback by My Two Cents — November 16, 2006 @ 9:02 pm

  20. [...] article and the screenshots are quite promising. For those who may like how OS X renders fonts then give it a try. Submit this post to [...]

    Pingback by Personal Bytes » OS X font rendering in Linux — January 8, 2007 @ 5:13 am

  21. 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…

    Comment by Diogo — January 26, 2007 @ 3:50 am

  22. Anyone know how to do this on a non-debian based Linux (Fedora or SUSE)? Not everyone has dpkg-reconfigure fontconfig!

    Comment by linkx — February 21, 2007 @ 10:56 am

  23. @linkx
    Refer to my other post here
    http://jaganath.wordpress.com/2006/11/16/cleartype-lcd-patch-on-mandriva-linux-2007/

    Users have confirmed that it works on SUSE and Fedora too!!

    Comment by jaganath — February 21, 2007 @ 11:20 am

  24. Your fonts look as awful (blurry) as they do on an any Apple computer: http://www.atpm.com/12.01/paradigm.shtml

    Windows wins again.

    Comment by Maxar Ajoke — May 2, 2007 @ 4:33 am

  25. I haven’t tested it yet, but there are binaries of Turners cleartype patch for Feisty now: http://ubuntuforums.org/showthread.php?t=343670.

    By the way, thanks for the great tutorial. It worked like a charm on Edgy.

    Comment by ugo — June 3, 2007 @ 2:50 pm

  26. [...] made a small update to the ever-popular post on this blog: OS X like font rendering in Linux.  The guide now covers Edgy too. Turner’s patches for Edgy are now available through a [...]

    Pingback by TuxFeed › Font smoothing on Edgy Eft — August 2, 2007 @ 11:33 pm

  27. [...] Perhaps the best patch available for font rendering is the LCD cleartype patch from Freetype maintainer David Turner. Though this patch is no longer available from Turner, you can download it from several places on the internet. I have shared one of them here. Let us see how we can apply this patch on Mandriva 2007. Ubuntu users, please refer to my another interesting howto here. [...]

    Pingback by TuxFeed › Cleartype LCD patch on Mandriva Linux 2007 — August 2, 2007 @ 11:34 pm

  28. Your site has become my favorite site!

    Comment by kill — March 13, 2008 @ 9:40 pm


Say something?Comments RSS TrackBack URI

    Subscribe

    a

    My Delicious