www. O S N E W S .com
News Features Interviews
BlogContact Editorials

Interview with David Turner of Freetype
By Eugenia Loli on 2007-06-28 21:39:35
Today we feature a very interesting interview with David Turner, one of the main Freetype developers, discussing the project's past and future. These days, David continues his work in Freetype even after having been hired by Google.

1. What drove you to work with Freetype and typography in general?

David Turner: I started working on FreeType 1 during the winter of 1995. At that time I was a graduate student and was developing mostly on OS/2. It was really a nifty operating system but it didn't support TrueType fonts at all. I had read on the Internet that it was possible to "plug" a new font renderer into the system with a properly written DLL. Despite the fact that I had absolutely no documentation on the topic, I thought it would be a cool and useful project, and I started cranking my first rasterizer in Pascal, no less :-)

I had something working after a few months (but not DLL, nor really stellar rendering) and decided to put the code on the Internet. I was quickly contacted by Robert Wilhelm, and later by Werner Lemberg who helped me tremendously manage the project. Robert retired from the team a long time ago, but Werner is still very actively maintaining FreeType, taking care of all the little details I generally do not do. the project owes a lot to his careful work and attention. I'd really like to dedicate this interview to him: Werner, you just rock !

And did you know that he is a professional musician working at a German Opera house ? I love this guy.

2. What are the main advances of Freetype in the last few years?

David Turner: Mainly the work being performed on the auto-hinter. A really great deal of tuning and experimentation has been provided, coming from many diverse people. The final result is not too bad in my opinion, though there is still room for improvements (even big ones). Making it better is however a very slow process because there are many push-pull effects: tune the algorithm to improve some shapes of some fonts, and you have high chances of ruining some others in the same fonts or different ones. Sometimes, you only discover the problem you introduced by chance, or because a user downloaded the CVS version and tells you that some russian letter is no longer correct. And the worst is that you nearly don't notice any difference with the original one :-)

And people have their own preferences. Do a change, some people will complain while others will be very happy with it. With auto-hinting, or even hinting in general, it's pretty impossible to please everyone so you need to make choices.

We try to compromise when we can. For example, we already have distinct algorithms for Latin-based scripts and non-Latin ones. I hope to be able to introduce more specialization in the future, but this will be introduced very slowly.

3. If the patent owner of hinting gives the Freetype project a free license, would you accept it?

David Turner: It really depends on the terms of this "free license". Basically if it means the patent can not be freely re-licensed to other people, I really don't see why I would find that useful. If you absolutely need the bytecode interpreter, you can be patient and wait for October 9, 2009, when the patents expire.

Or use the auto-hinter. It's not that bad, really.

4. What did you think of Vista's new font renderer?

David Turner: I don't have Vista and I've never touched a computer that runs it, except those displayed in computer stores. so all I know about it comes from the web (screenshots, articles, opinions, etc...). I believe that what has changed from XP is basically a better color filter and sub-pixel positioning.

And in the grand debate between ClearType and OSX rendering, which became the rage since Safari was released for Windows, I tend to think that the "fuzzier" rendering is better for several reasons:

- it's true to the original glyph shape.
- it allows you to implement fine-grained kerning
- it allows for true device independence when performing text layout.

The latter buys you some cool features, like being able to zoom a document without the need to reflow the text, no matter how complex it is (like, in this ad, for example ;-) )

It's now possible to get sub-pixel positioning in Vista, but I believe this feature is only available for WPF applications. this makes this option pretty useless if you target a large percentage of Windows users though.

On the other hand, I understand why Windows users are complaining. the big difference is that ClearType's hinting improves the contrast of text, so a Safari window will invariably look more fuzzy than the rest of the system on Windows.

The thing is, it's pretty easy to get used to the fuzziness if it's a system-wide setting. that's why there were no general uproar when the first version of OS X was released on the Mac, which was even *more* fuzzy than this OS' current text rendering.

5. For best results, what's best? Enabling hinting, or having fonts specially designed to work best with Freetype?

David Turner: It depends on what you want, really. For best contrast/sharpness, you can't beat hand-coded bitmaps but these don't scale. For best shapes, you should go the un-hinted path. Everything between is a compromise.

Native TrueType hinting represents an ingenious way to obtain hand-coded level results that scale to different sizes, but designing a high-quality TrueType font takes a *lot* of time. As an example, I've been told by people in the industry that the original four Times New Roman font files available in Windows had been developed by a team of 12 people working at Monotype for a year. Even though font design tools have matured in the last years, there is still a lot of work involved to generate good TrueType hints.

ClearType is a technique that allows you to "expand" the horizontal resolution of your display, making hinting less necessary in this direction. OS X implements ClearType-like LCD filtering without the hinting, and this improves things quite a bit on certain displays. Unfortunately, the quality improvement is also very relative to the display being used, your own visual system and of course preferences.

There is no clear answer as to what is best. Personally, I can't stand native TrueType hinted fonts anymore, they look too distorted to me, even if their contrast is better. My favorite Linux distribution is Ubuntu at the moment, and the first thing I do after installing it is to wipe the version of FreeType provided with it to get rid of the bytecode interpreter :o)

Also, I still don't understand why Debian and Ubuntu keep distributing patent-infringing code in FreeType, while they keep MP3 and DVD playback out of their normal installs. I'm not even sure it's DFSG compliant...

6. What features not-yet implemented can further improve Freetype's performance and visual quality?

David Turner: Regarding visual quality, I'd like to add other script-specific hinting modules to the engine, but this is relatively hard for me because I'm not too familiar with the many subtleties of international scripts. For example, I know the Arabic script(s) very well, but I wouldn't claim being an expert on Arabic typography and the way it should be best hinted/rendered on screen.

Algorithmic knowledge doesn't translate into good taste :-)

I'd like to better handle symmetric and quasi-symmetric character shapes, as well as better handle accents and some other "composites". I have already experimented with these, but the results are still too random to be part of the default build (which means, it works well for a large set of characters, but totally ruins a small set of others...)

There is still some possible work on improvement the LCD filtering capabilities that were added in 2.3.0, though the current ones are still very good for a large set of screens.

On the other hand, I believe it's still possible to make more drastic improvements on *top* of the font engine to improve the quality of text rendering on a typical Unix desktop. I'm thinking about things like sub-pixel positioning, automatic-kerning directed by auto-hinter parameters (to improve inter-character spacing), gamma-correct alpha composition. Unfortunately, all of these require some non trivial changes to libraries like Pango, Cairo or LibXft, and even the X Server. it's certainly not gonna happen quickly.

7. Do you believe that Freetype is currently well-optimized for inclusion in embedded systems?

David Turner: Yes, it's been designed from the start to be used in very memory and CPU constrained environment. and I routinely profile it to keep it that way. A lot of the algorithms used, especially in the auto-hinter, were chosen because they run well on limited hardware with very widely different inputs.

I never quite understood the people who say that you should not worry about optimizing your code until very late in the project. My experience is that this attitude leads developers to choose very sophisticated and generic designs that are extremely difficult to retrofit into something efficient later, because so many layers in the code depend on them. I'm not advocating micro-optimization, simply the fact that you should be able to profile and adjust your designs incrementally during development.

And in case you didn't know, FreeType is already heavily used in the embedded industry. It's running in various amounts of electronic gizmos: cell-phones, set-top-boxes, cameras, GPS and even video games. Since I've started working for Google, I've met many people in the Silicon Valley during my trips here, and I've heard things like "we use your stuff" many many times :-)

29  Comments - Printer friendly - Related stories

Tell a friend
Your full name:
Your email address:
Your friend's email:
Anti-spam measure:

News Features Interviews
BlogContact Editorials

WAP site - RSS feed
© OSNews LLC 1997-2007. All Rights Reserved.
The readers' comments are owned and a responsibility of whoever posted them.
Prefer the desktop version of OSNews?