February 27, 2010

hardware accelerated graphics and text in firefox!

With all the excitement around those two great articles on JagerMonkey yesterday, I forgot to blog about another amazing development, the DirectWrite & Direct2D landing in the nightly builds (though pref'd off.)

DirectWrite and Direct2D are Windows Vista and Windows 7 APIs for text and 2-D graphics that can be hardware accelerated.

This is brand new code and there are sure to be bugs. If you'd like to help us test these changes and you're on a supported platform, please download the latest nightly build and make these changes to enable the features:

  1. Enter 'about:config'
  2. Click through the warning, if necessary
  3. Enter gfx.font in the 'Filter' box
  4. Double-click on 'gfx.font_rendering.directwrite.enabled' to set it to true
  5. Below this, right click and select New > Integer to add a pref setting
  6. Enter 'mozilla.widget.render-mode' for the preference name, 6 for the value
  7. Restart

(To disable, set gfx.font_rendering.directwrite.enabled to false, delete mozilla.widget.render-mode, then restart.)

If you find bugs, please report them here or to Bugzilla.

note: Some extensions like stylish and adblock+ may break the new features. If you're not seeing the new DirectWrite and Direct2D changes, try starting in Safe Mode.

update: If you want to help others find and test this new feature, please digg it. Thanks.

update2: The fonts look really great with DirectWrite enabled. Really great.

Posted by asa at 12:08 PM