opensource.google.com

Menu

Got CFF?

Wednesday, May 1, 2013


A dramatically improved CFF rasterizer for FreeType

In our commitment to the open source community, Google, in cooperation with Adobe and the FreeType project, released the Adobe CFF engine, an advanced CFF rasterizer, into open source for beta test. This paves the way for FreeType-based platforms to provide users with richer and more beautiful reading experiences. The FreeType open source software powers font display on more than a billion devices. It is used for rendering on a variety of platforms including Android, Chrome OS, Linux, iOS, and many versions of Unix.

OpenType, an extension of TrueType, can describe glyph outlines in two ways  TrueType outline format and Compact Font Format (CFF). CFF is a descendant of the PostScript font format developed by Adobe. These formats use different approaches to specifying the glyphs (the images for each character) and the hints (the instructions on how to modify a glyph to look good at certain sizes). CFF fonts are capable of very high quality display but the technology places the burden for this display quality on the text rasterizer instead of on the font as is done in TrueType. The new Adobe CFF engine brings that high quality rasterizer support to FreeType.

Because many display devices have finite resolution limits, displaying text requires balancing many things: making the text readable, ensuring that no characters are too light or too heavy, consistent height and width, all while respecting the original typeface design. The tradeoffs required to make the text look good are more difficult to balance as the size of the text decreases. For languages like Japanese, where there are often many strokes per character, it is even more difficult and great care must be taken to avoid the character turning into an unreadable blob.

Text rasterization produced by the new Adobe CFF engine in FreeType is dramatically more faithful to the typeface design. The improvements include better stem widths and placement, fewer dropouts, dramatic reduction in the ‘blobbiness’ of Chinese, Japanese, and Korean, and more even visual weight. While all of this may sound somewhat technical, the advantages are not, and will benefit technical and non-technical users alike. These improvements lead to more beautiful looking text that is easier to read.

FreeType Native CFF Rasterizer 

FreeType Light Auto Hint Rasterizer

FreeType using the New Adobe CFF Rasterizer


In these examples you can clearly see an improvement in the overall “beauty” of the text when the new Adobe CFF rasterizer is used. The original FreeType CFF rasterizer is used in the first sample and it has very inconsistent blackness with a lot of blobbiness. The sample generated using the original FreeType rasterizer with auto hinting is in the middle and it is better but it lightens the original font too much and makes it faint, plus the individual glyphs have a lot of variation in height. Finally, the last sample generated using the new advanced rasterizer is on the bottom and it produces more even blackness of text, fewer blobs, more even and consistent character heights, and fewer dropouts.

FreeType Native CFF Rasterizer

FreeType Light Auto Hint Rasterizer

FreeType using the New Adobe CFF Rasterizer

The improvement for Latin text is just as striking. The example above shows the quality improvement - still with the original FreeType on top, FreeType with auto hinting in the middle, and the new advanced CFF rasterizer in FreeType on the bottom.

The new Adobe CFF rasterizer is available to test as part of the FreeType release. Those who build applications and platforms using FreeType are encouraged during this beta period to test it out. The rest of you are unfortunately going to have to wait until after the beta test is done and the various platforms using FreeType have fully integrated the changes. We promise it will be worth the wait.

By Stuart Gill and Brian Stell, Internationalization Engineering


.