On Tue, Oct 16, 2012 at 9:16 PM, Zack Weinberg <za...@panix.com> wrote: > Until quite recently the FreeType autohinter did a very bad job on a > surprising number of popular webfonts - rendering letters in the same word > with inconsistent perceptual x-height, for instance.
What kind of fonts? Bicameral or other? Display fonts or more normal fonts? On Tue, Oct 16, 2012 at 10:58 PM, Karl Tomlinson <mozn...@karlt.net> wrote: > I struggle to imagine how the autohinter can compete with > human-specified hint instructions. Even > http://www.freetype.org/ttfautohint/ seems to imply that some > human interaction is expected. It’s quite good without human interaction, really. I tested ttfautohint with TeX Gyre Pagella. (I did the test for a hobby purpose earlier, but I took screenshots today for the purpose of this thread.) This font is a particularly good one for a demo. It is an OTF font that imports its outlines from URW Palladio L which is based on the same design by Herman Zapf as Linotype’s Palatino. This allows a comparison with Palatino on Mac and Palatino Linotype on Windows. Presumably, the best TrueType hinting expertise in the world was available for the development of Apple’s TrueType Palatino and for Palatino Linotype which was a collaboration between Microsoft and Linotype. I used FontForge to convert the Pagella OTF font into a TTF without requesting FontForge to do anything else. (That is, the result retained the CFF 1000 units per em convention and didn’t involve a conversion to 2048 units per em.) Then I ran ttfautohint on the converted font. First, in Firefox on Ubuntu we can see that both TTF versions appear to be of similar rendering quality as the original OTF version. Furthermore, unsurprisingly considering that this is FreeType with its autohinter, the two TTF versions look the same. hsivonen.iki.fi/screen/hinting/pagella-ubuntu.png On a Mac, the three versions of Pagella look equally good. Moreover, they look equally good as Palatino as shipped by Apple. TrueType hints don’t seem to important in Quartz. http://hsivonen.iki.fi/screen/hinting/pagella-mac.png http://hsivonen.iki.fi/screen/hinting/palatino-mac.png In Firefox on Windows 7 when running without GPU acceleration, we see that the OTF rasterization is just terrible with inconsistent x-height and inconsistent stroke weight despite declarative hints being present in the CFF data. The TTF version with FontForge hinting is more consistent but still horribly broken: there are holes where there should be horizontal strokes. The TTF version hinted with ttfautohint, however, shows up as being of similar quality as Palatino Linotype. http://hsivonen.iki.fi/screen/hinting/pagella-windows7-firefox.png http://hsivonen.iki.fi/screen/hinting/palatino-linotype-windows7-firefox.png In IE9 on Windows 7 running on the same virtual machine as the Firefox instance I tested, things look better. he OTF and the FontForge TTF versions look almost as good as Palatino Linotype, but there are glitches in individual glyphs ($ and 2 in the OTF case; bottom serif of p in the TTF case). The ttfautohint version actually looks better than Palatino Linotype. It's better anti-aliased, so there are no jaggies while Palatino Linotype shows jaggies. Of the eight different Windows font rasterization was shown here, it is the only rasterization that is competitive with the Ubuntu and Mac results. http://hsivonen.iki.fi/screen/hinting/pagella-windows7-ie9.png http://hsivonen.iki.fi/screen/hinting/palatino-linotype-windows7-ie9.png (I have filed the extraordinary difference between Firefox and IE9 in OTF/CFF rasterization as https://bugzilla.mozilla.org/show_bug.cgi?id=782226 ) The test page I used is http://hsivonen.iki.fi/test/palatino/palatino.html > I was under the impression that FreeType autohinter used > heuristics based on expectations of the shape of Latin characters. It does. The Latin heuristics are applicable to Greek and Cyrillic, too. > I'd be surprised if that had been extended to all characters/scripts. The ttfautohint page says: “Add support for all the world's writing systems – since FreeType's autohinting system supports the Arabic and CJK (Chinese, Korean, Japanese) writing systems, ttfautohint could do so too. (So far the primary goal is to make ttfautohint work well with the latin script.)” -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform