NME Font Rendering

I notice FreeType has a new version out, which has some reasonable changes since a key patent has expired.

Version 2.3.9, Default
Version 2.3.9, AutoHinting
Version 2.4.4, Default
Version 2.4.4, AutoHinting
Flash (Mac)
GDI Threshold (Current)
GDI AA
GDI AA + Gamma
Flash (Windows)

So a few observations: The “Default Hinting” has changed quite a bit for TrueType fonts in the latest version. I think this code is what the expired patent related to, allowing the font-specific hinting data to be used. The “AutoHinting” mode is based on font-independent logic built into FreeType. The Flash renderer uses component based sub-pixel rendering, using RGB components to get finer details. The font also looks a bit “fatter”.

Currently NME uses a single set of bitmaps for the fonts, which must be used for all colours. This means that component based sub-pixel rendering is not really an option. However, it may be possible to sort something out (at the expense of more memory) if the need really arises. But also note, this is counter-productive in landscape mode on mobile devices.

On windows, NME currently uses GDI fonts with a threshold. I like the look of this (I spend most of my time on windows) for the small fonts, but it looks pretty bad on the larger fonts. Particularly note the exactly 1-pixel wide vertical lines in the “H” and the “l”, which I like. The larger fonts look much better with anti-aliasing on. However, windows applies some kind of gamma-correction when rendering fonts, and you get quite a different look for black-on-white and white-on-black. To work around this, I have applied a lookup-table to get a bitmap that will work for both light and dark.

Finally notice the windows flash renderer does not use AA with this swf (although the Mac version did).

In the next version, I will change windows over to use GDI + AA + Gamma. It is possible to use FreeType, but I think the font is slightly less readable at the smaller sizes. What do you think?

Four Years – Still Kicking

Wow, I missed the 4-year anniversary. I have been a bit remiss in updating the old social-media postings of late, but will try harder. So apologies to those whose comments I have not answered, and I hope to do better in the future.

I would also like say a big thanks to those who have donated to the site – it is nice to feel useful.

The main change since last update was the release of hxcpp 2.07. This goes with the latest haxe release and fixes many bugs, making the platform more robust.

Work on NME continues. There has been some increased interest of late, and a new release is well overdue. I’m currently working on a “project” system to help with getting up-and-running on the various platforms. This will replace the iPhone template system and extend it to all supported platforms.

You can always checkout the svn version of NME, but you will need to build the binaries yourself. Although I have quite a few outstanding issues, I think I will do a release once I get the project system up-and-running.