Firefox 4 (beta 3) has added OpenType Layout support, controllable through private CSS extensions. It works on Mac OS X by default, while in the Windows version of Firefox 4, you need to open the URL
about:config and set the
gfx.font_rendering.harfbuzz.level option to
This is quite an interesting opportunity for font developers, and especially Python scripters. You could produce complex HTML renderings of your fonts including OpenType Layout feature previews, right out of your font editor such as FontLab Studio. Combined with the fact that Firefox supports webfonts in OTF and TTF formats, it's trivial to generate a simple web page.
The CSS property to use in
-moz-font-feature-settings. The mechanism is documented on the Mozilla Hacks blog.
Firefox 4 uses HarfBuzz, an opensource OpenType Layout library which provides a similar functionality to Uniscribe. HarfBuzz supports user-controllable OpenType Layout features as well as complex-script shaping rules. This all makes it a lightweight environment to test your OpenType Layout features. Unfortunately, Firefox currently does not print using webfonts, so you won't be able to get a PDF with your font showings out of Firefox easily.
Correction: Firefox uses harfbuzz-ng, a "next generation" version of the library, which does not yet integrate complex-script shapers. So FF4 is, for now, good just for testing user-controllable OT Layout features.
Here's an example which renders "Hello small caps world!", in which "small caps" is rendered in OpenType small caps (with the "smcp" feature applied).
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
src: url('MyTestFont.otf') format("opentype");
Hello <span style="-moz-font-feature-settings:'smcp=1';">small caps</span> world!