
Font Rendering - Mac vs Ubuntu - arunoda
http://arunoda.me/blog/font-rendering-mac-vs-ubunut.html
======
sitharus
What's happening here is freetype2 (and to a greater extent Windows) are grid-
fitting the fonts. They anchor the font to the nearest pixel via a rather
complex algorithm, and then anti-alias that. You can see exactly what's
happening on Windows by turning off ClearType.

This results in a font that is sharper on screen, but is more jagged and
doesn't resemble the print counterpart quite as well.

MacOS on the other hand renders the font as it would for print - ignoring
pixel boundaries - then antialiases that. On low DPI screens this results in a
heavier feeling font, and some times artefacts where parts of the font get
blurred out, but there's less difference between screen and print.

This was more useful when Macs were used heavily in pre-press, you'd want your
display to match the print so you can avoid making proofs.

A few fonts include pixel alignment hints which Windows (but not freetype
unless you compile yourself - Apple has patents on this) and MacOS can use to
make a nicer alignment on screen, but since the libraries got better at auto-
fitting these have dropped away. Take a newish font and put in on Windows XP
with ClearType off to see how bad XP's was. Vista was better and 7 is pretty
similar to MacOS when there are no hints.

It's not so relevant these days, but I don't imagine Apple changing. I'd
expect Apple to move to high DPI screens over the next few years where this
isn't an issue.

~~~
mistercow
>This was more useful when Macs were used heavily in pre-press, you'd want
your display to match the print so you can avoid making proofs.

It's also useful if you just prefer it that way. Strong hinting discards most
of the original character of the font, but a lot of people find it easier to
read. I think strong hinting looks like garbage, but this is a matter of
opinion.

~~~
ajross
Clearly it's a matter of opinion. But I don't think your explanation makes any
sense -- surely the presence or absence of a clear edge to the outlines is
part of the "character" of the font too, no? The font designers didn't
_intend_ for it to be blurry...

~~~
mistercow
What I mean is that hinting reduces the distinctions between fonts far more
than mere antialiasing does. Or, equivalently, hinting discards more
information.

------
cutie
This is well-known and by design.

Mac renders fonts optimized for "correctness", which can appear fuzzy at low
resolution. Their new hi-res (~200dpi) screens solve the problem, you get
correctness and legibility.

Windows and Linux tend to optimize for screen legibility at low resolution,
resulting in increased sharpness. At hi-res, they'll likely not look as
correct as the Mac rendering.

~~~
arunoda
That means this is a well known issue?

~~~
sitharus
definitely a well-known, it's been the case ever since MacOS had antialiasing.

It's unlikely to be 'fixed' as it's a different philosophy between the OSs.

~~~
cutie
Also, as I alluded to in my previous comment, as resolutions increase in the
future, the Mac OS approach is more correct in the long run. Though, it has
come with the cost of fuzzy fonts and squinting for the last decade.

~~~
arunoda
Seems like that's why they are investing more on Retina displays.

~~~
melling
It's probably the vision that they had planned for years. Isn't that where we
all want to go? I'm hoping that "Retina" becomes the new standard everywhere
within the next few years.

------
notJim
No discussion of font rendering in Linux is complete without a hat tip to
infinality, which aims to provide much better font rendering. infinality
started out as a patch to freetype, and was recently merged in, which is quite
exciting.

~~~
threedaymonk
I hadn't heard of infinality, but a quick search led me to
<http://www.infinality.net/blog/>

Ironically, the website is quite hard to read, thanks to a kind of simulated
macular degeneration effect of drop-shadow glow around each letter. It amused
me.

I can't find many examples of the effect of the infinality patches, though. Is
it just a single-axis hinter?

~~~
wreckimnaked
Last time I configured Infinality I remember the example config file being
very well explained about the possible options. Try installing it and reading
your /etc/profile.d/infinality-settings.sh

------
dphase
This can be changed on OS X with a

    
    
      defaults -currentHost write -globalDomain AppleFontSmoothing -int [value]
    

I personally use a value of 1. There's an entire article on this at
[http://osxdaily.com/2010/02/18/change-font-smoothing-
setting...](http://osxdaily.com/2010/02/18/change-font-smoothing-settings/)

~~~
dchest
This is a different thing: it disables subpixel rendering. Doesn't affect
hinting.

------
geoffroy
BTW, everything looks so big on unbuntu 12.04 compared to win xp on my laptop
at 1280 x 800 px res. Is it normal ? even reducing the font size on ubuntu to
10px does not change much. I can't see as much thing on the screen on ubuntu
compared to win xp, playschool like. Not very convenient for surfing or
coding.

------
arunoda
I found some command on the web to change the font smoothness. Here is it and
with option 1. It looks quite great than earlier.

defaults -currentHost write -globalDomain AppleFontSmoothing -int 1

~~~
mmariani
Are you sure? It appears not to work on Lion.

    
    
      2012-10-10 21:29:32.922 defaults[24228:707] 
      Domain AppleFontSmoothing does not exist

~~~
arunoda
I'm on Lion too. It works for me. Look here -
[http://osxdaily.com/2012/06/09/mac-screen-blurry-optimize-
tr...](http://osxdaily.com/2012/06/09/mac-screen-blurry-optimize-troubleshoot-
font-smoothing-os-x/)

I steal it from there.

~~~
cpeterso
How can you tell if it is working? I don't see any difference (even after
`killall Finder`).

------
Zolomon
To get a similar font rendering on Windows take a look at:
<http://code.google.com/p/gdipp/>

