LWN.net Logo

Liberation fonts: hinting needed

Liberation fonts: hinting needed

Posted Jun 21, 2012 20:25 UTC (Thu) by Richard_J_Neill (subscriber, #23093)
Parent article: Liberation fonts and the tricky task of internationalization

Unfortunately, the Liberation fonts aren't well hinted, with antialiasing off. This means that for those of us who value sharp contrast and clarity more than beauty and fidelity-of-typeface, they don't work well.

There are three ways to make fonts work well on a pixel-based display.

[0. Fixed, non-scalabled fonts (the old 75dpi and 100dpi fonts).]

1. Antialias. This adds grey (and sometimes coloured) sub-pixels to avoid jagged outlines. It makes the letters well-shaped, and true to the typeface. C.f. "Cleartype". About 20% of people (including myself) find the effect most unpleasant: it sacrifices contrast, and makes the display look out-of-focus, causing eye-strain. All truetype fonts can be antialiased.

2. Hinting. The shape of the letters is distorted (at small size) so that the lines fit more naturally over the pixel-grid. The letters are sharp and clear. An "e" is no longer a "times new roman 'e'"; more "an optimised e-grid, that is slightly times-new-roman-ish". All pixels are either black or white. With full-hinting and no antialiasing, this works. BUT, you must use the libfreetype which has the "Bytecode interpreter" turned on, and one of the small subset of fonts that are well hinted, Tahoma being a good example.

3. Retina display. Make the pixel density so high that the issue disappears. (alternatively, make the fonts really large, eg 25pt, with antialiasing).

[My personal recommendation is 8pt Tahoma for the GUI, and Terminus for the shell; full hinting, no-antialiasing]


(Log in to post comments)

Liberation fonts: hinting needed

Posted Jun 22, 2012 18:31 UTC (Fri) by daniel (subscriber, #3181) [Link]

"About 20% of people (including myself) find the effect most unpleasant: it sacrifices contrast, and makes the display look out-of-focus, causing eye-strain."

Perhaps that 20% would largely consist of owners of 1024x768 resolution monitors or worse. The "high contrast" you perceive in a black/white font is actually aliasing, an effect that is in general, highly unpleasant. Theory says it goes away completely when the highest spatial frequency of the source image is less than half the pixel grid spacing. This is achieved by low pass filtering, aka anti-aliasing. Reality is, for accurate image display you also need gamma correction, otherwise the intensity curve of a standard RGB monitor is wildly wrong. And the pixel spacing has to be less than what your eye can resolve, which the real test is not whether you can see jaggies or not (jaggies produce an easily perceivable nonlocal intensity variation) but whether you can count the number of lines in a series of one pixel stripes.

If you insist on using black/white text display then you need a really high resolution display to make the jaggies go away, but if you display properly band-limited images you will likely be fine with a display with just modestly improved resolution. Your goal is to get the highest, non-aliasing spatial frequency down below the resolution of your eye. To put this to the test all you have to do is move back from the monitor, increasing the point size of the font as you go until any perceived blurriness disappears. There is always such a distance and it is not as great as you think. Then the ratio between that distance and the distance at which you would actually like to view the screen is the amount by which you need to increase your linear pixel density.

Liberation fonts: hinting needed

Posted Jun 30, 2012 4:25 UTC (Sat) by k8to (subscriber, #15413) [Link]

I own a desktop 1600x1200 display and a laptop 1440x920 display. On both i find font 'anti-aliasing' of the cleartype variety creates blurry letters.

So I don't agree with this assessment.

Moreover the idea that high contrast is the same as aliasing is simply false. It's necessary to have aliasing at low resolutions to have high contrast, but even with "anti-aliasing" techniques, aliasing is still present, it is merely mitigated to some degree. I prefer clarity over prettiness. I'm not sure why one would ever elect differently for reading fonts.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds